Skip to content

Commit a37e8a2

Browse files
committed
chore: rebasing
1 parent 8ab0202 commit a37e8a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/payload/src/uploads/getExternalFile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const getExternalFile = async ({ data, req, uploadConfig }: Args): Promis
3333

3434
const headers = uploadConfig.externalFileHeaderFilter
3535
? uploadConfig.externalFileHeaderFilter(Object.fromEntries(new Headers(req.headers)))
36-
: { cookie: req.headers.get('cookie') }
36+
: { cookie: req.headers?.get('cookie') }
3737

3838
const res = await fetch(fileURL, {
3939
credentials: 'include',
@@ -50,7 +50,7 @@ export const getExternalFile = async ({ data, req, uploadConfig }: Args): Promis
5050
return {
5151
name: filename,
5252
data: Buffer.from(data),
53-
mimetype: res.headers.get('content-type') || undefined!,
53+
mimetype: res.headers.get('content-type') || undefined,
5454
size: Number(res.headers.get('content-length')) || 0,
5555
}
5656
}

0 commit comments

Comments
 (0)