Default media upload file mime types to application/octet-stream so that uploading doesn't fail rust side

This commit is contained in:
Stefan Ceriu
2023-07-24 09:57:16 +03:00
committed by Stefan Ceriu
parent 1618af5857
commit f400dff471

View File

@@ -117,7 +117,7 @@ struct MediaUploadingPreprocessor {
// Process unknown types as plain files
guard let type = UTType(filenameExtension: newURL.pathExtension),
let mimeType = type.preferredMIMEType else {
return await processFile(at: newURL, mimeType: nil)
return await processFile(at: newURL, mimeType: "application/octet-stream")
}
if type.conforms(to: .image) {