Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2eba04b9da |
@@ -397,7 +397,7 @@ func (s *UploadService) writeIncomingFilesToBox(ctx context.Context, box *Box, f
|
||||
storedName := "@each@" + fileID + strings.ToLower(filepath.Ext(incoming.Name()))
|
||||
objectKey := boxObjectKey(box.ID, storedName)
|
||||
contentType := incoming.ContentType()
|
||||
if contentType == "" {
|
||||
if contentType == "" || contentType == "application/octet-stream" {
|
||||
buffer := make([]byte, 512)
|
||||
n, _ := file.Read(buffer)
|
||||
contentType = http.DetectContentType(buffer[:n])
|
||||
|
||||
Reference in New Issue
Block a user