Skip to content

Commit 6342526

Browse files
committed
Enforce Content-Type on file uploads for correct browser handling
1 parent c996407 commit 6342526

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib/supabase/storage.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ export const uploadFile = async (file: File, path: string) => {
77
.from('files')
88
.upload(path, file, {
99
cacheControl: '3600',
10-
upsert: false
10+
upsert: false,
11+
contentType: file.type
1112
});
1213

1314
if (error) {

0 commit comments

Comments
 (0)