mirror of
https://github.com/minio/minio.git
synced 2025-02-04 10:26:01 -05:00
Remove contenttype pseudo func()
This commit is contained in:
parent
4770f611e0
commit
dccf32e5c4
@ -331,18 +331,11 @@ func (diskStorage StorageDriver) CreateObject(bucketKey string, objectKey string
|
|||||||
}
|
}
|
||||||
// close connections
|
// close connections
|
||||||
|
|
||||||
contenttype := func(contenttype string) string {
|
|
||||||
if len(contenttype) == 0 {
|
|
||||||
return "application/octet-stream"
|
|
||||||
}
|
|
||||||
return strings.TrimSpace(contenttype)
|
|
||||||
}
|
|
||||||
|
|
||||||
metadataObj := storage.ObjectMetadata{
|
metadataObj := storage.ObjectMetadata{
|
||||||
Bucket: bucketKey,
|
Bucket: bucketKey,
|
||||||
Key: objectKey,
|
Key: objectKey,
|
||||||
|
|
||||||
ContentType: contenttype(contentType),
|
ContentType: contentType,
|
||||||
Created: time.Now(),
|
Created: time.Now(),
|
||||||
Md5: hex.EncodeToString(hasher.Sum(nil)),
|
Md5: hex.EncodeToString(hasher.Sum(nil)),
|
||||||
Size: int64(totalLength),
|
Size: int64(totalLength),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user