Skip to content

Commit

Permalink
@uppy/companion: coerce requestUrl to a string (#5128)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored Apr 29, 2024
1 parent 0f84390 commit 4028a6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@uppy/companion/src/server/helpers/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ exports.getURLMeta = async (url, blockLocalIPs = false) => {
// we add random string to avoid duplicate files
const filename = response.headers['content-disposition']
? contentDisposition.parse(response.headers['content-disposition']).parameters.filename
: path.basename(response.request.requestUrl)
: path.basename(`${response.request.requestUrl}`)

// No need to get the rest of the response, as we only want header (not really relevant for HEAD, but why not)
stream.destroy()
Expand Down

0 comments on commit 4028a6d

Please sign in to comment.