From 046cbb2a1a059170747d43d04adba64b6d8fdf8d Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Mon, 19 Jun 2023 12:57:10 +0200 Subject: [PATCH] remove random path part reverts https://github.com/transloadit/uppy/pull/4489#discussion_r1225535334 --- packages/@uppy/companion/src/server/helpers/request.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/@uppy/companion/src/server/helpers/request.js b/packages/@uppy/companion/src/server/helpers/request.js index a490af7615..0fe52cefca 100644 --- a/packages/@uppy/companion/src/server/helpers/request.js +++ b/packages/@uppy/companion/src/server/helpers/request.js @@ -6,7 +6,6 @@ const dns = require('node:dns') const ipaddr = require('ipaddr.js') const got = require('got').default const path = require('node:path') -const { randomUUID } = require('node:crypto') const contentDisposition = require('content-disposition') const logger = require('../logger') @@ -139,7 +138,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)}-${randomUUID()}` + : 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()