mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
quota: improve size check
get the remaining allowed size when an upload starts and check it against the uploaded bytes Fixes #128
This commit is contained in:
@@ -170,7 +170,9 @@ func newActionNotification(user dataprovider.User, operation, filePath, target,
|
||||
} else if user.FsConfig.Provider == 2 {
|
||||
bucket = user.FsConfig.GCSConfig.Bucket
|
||||
}
|
||||
if err != nil {
|
||||
if err == errQuotaExceeded {
|
||||
status = 2
|
||||
} else if err != nil {
|
||||
status = 0
|
||||
}
|
||||
return actionNotification{
|
||||
|
||||
Reference in New Issue
Block a user