mirror of
https://github.com/minio/minio.git
synced 2026-11-23 23:17:48 +00:00
Forbid the upload of files bigger than the memory backend capacity
This commit is contained in:
1 parent
ab80057c5c
commit
d360d0fec3
3 files changed
+25
-8
No files matched your search
@@ -271,8 +271,11 @@ func (memory *memoryDriver) createObject(bucket, key, contentType, expectedMD5Su
|
||||
totalLength := len(readBytes)
|
||||
|
||||
memory.lock.Lock()
|
||||
memory.objects.Set(objectKey, readBytes)
|
||||
ok := memory.objects.Set(objectKey, readBytes)
|
||||
memory.lock.Unlock()
|
||||
if !ok {
|
||||
return "", iodine.New(drivers.InternalError{}, nil)
|
||||
}
|
||||
// setting up for de-allocation
|
||||
readBytes = nil
|
||||
|
||||
|
||||
Reference in new issue
Block a user