diff --git a/backend/libs/services/upload.go b/backend/libs/services/upload.go index 94e9eaf..e7bce12 100644 --- a/backend/libs/services/upload.go +++ b/backend/libs/services/upload.go @@ -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])