mirror of
https://github.com/minio/minio.git
synced 2025-11-23 02:57:42 -05:00
Forbid the upload of files bigger than the memory backend capacity
This commit is contained in:
@@ -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