Merge pull request #318 from harshavardhana/pr_out_remove_contenttype_pseudo_func_

This commit is contained in:
Harshavardhana 2015-03-17 00:47:46 -07:00
commit 42006c2ab0

View File

@ -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),