Skip to content

Commit 0e5aeb4

Browse files
Fixed issue with unrecognized mimetypes like binray files
1 parent cd52f3a commit 0e5aeb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main-process/ipc-handlers/main-api/object-handler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,12 @@ exports.createFile = async ({$event, localPath, dirname, onProgressChannel} = {}
206206
throw error;
207207
}
208208

209-
try {
209+
try {
210210
await s3.upload({
211211
path: object.path,
212212
content: fs.createReadStream(localPath),
213213
options: {
214-
ContentType: mimeTypes.lookup(basename),
214+
ContentType: (mimeTypes.lookup(basename)) || 'application/octet-stream',
215215
},
216216
onProgress,
217217
});

0 commit comments

Comments
 (0)