Skip to content

Commit cd6a909

Browse files
authored
fix: gracefully handle missing metadata in file adapter (#727)
1 parent ed441a6 commit cd6a909

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/storage/backend/file.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ export class FileBackend implements StorageBackendAdapter {
189189
await pipeline(body, destFile)
190190

191191
await this.setFileMetadata(file, {
192-
contentType,
193-
cacheControl,
192+
contentType: contentType || 'application/octet-stream',
193+
cacheControl: cacheControl || 'no-cache',
194194
})
195195

196196
const metadata = await this.headObject(bucketName, key, version)

0 commit comments

Comments
 (0)