mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
fix: fallback deletion url to relative path
if homeDomain is not configured via config file or env var the deletion url is a frontend page, so it cannot simply assume it's on the same domain as uploaded files
This commit is contained in:
parent
b18b2ee312
commit
0d05da40b0
@ -1103,7 +1103,7 @@ self.sendUploadResponse = async (req, res, result) => {
|
||||
// If uploaded by user, add delete URL (intended for ShareX and its derivatives)
|
||||
// Homepage uploader will not use this (use dashboard instead)
|
||||
if (req.locals.user) {
|
||||
map.deleteUrl = `${utils.conf.homeDomain}/file/${file.name}?delete`
|
||||
map.deleteUrl = `${utils.conf.homeDomain || ''}/file/${file.name}?delete`
|
||||
}
|
||||
|
||||
return map
|
||||
|
Loading…
Reference in New Issue
Block a user