mirror of
https://github.com/minio/minio.git
synced 2024-12-26 23:25:54 -05:00
Limiting upload id size
This commit is contained in:
parent
55bda21881
commit
cf559fa48e
@ -542,7 +542,7 @@ func (memory *memoryDriver) NewMultipartUpload(bucket, key, contentType string)
|
|||||||
memory.lock.Lock()
|
memory.lock.Lock()
|
||||||
id := []byte(strconv.FormatInt(rand.Int63(), 10) + bucket + key + time.Now().String())
|
id := []byte(strconv.FormatInt(rand.Int63(), 10) + bucket + key + time.Now().String())
|
||||||
uploadIDSum := sha512.Sum512(id)
|
uploadIDSum := sha512.Sum512(id)
|
||||||
uploadID := base64.URLEncoding.EncodeToString(uploadIDSum[:])
|
uploadID := base64.URLEncoding.EncodeToString(uploadIDSum[:])[:47]
|
||||||
|
|
||||||
storedBucket.multiPartSession = make(map[string]multiPartSession)
|
storedBucket.multiPartSession = make(map[string]multiPartSession)
|
||||||
storedBucket.multiPartSession[key] = multiPartSession{
|
storedBucket.multiPartSession[key] = multiPartSession{
|
||||||
|
Loading…
Reference in New Issue
Block a user