psi-4ward / psitransfer

Simple open source self-hosted file sharing solution.
BSD 2-Clause "Simplified" License
1.5k stars 217 forks source link

Duplication of baseUrl in uploadAppPath #256

Open Onslivion opened 1 year ago

Onslivion commented 1 year ago

When configuring these two variables as such;

  // set to serve PsiTransfer from a sub-path
  "baseUrl": '/securedownload',
  // use to set custom upload url (subfolder to baseUrl)
  "uploadAppPath": '/upload/',

The error page pops up, saying that a download bucket was not found. Notably this showed that there's a duplication of the baseUrl into the upload URL;

Screenshot 2023-01-08 at 16 18 41

I've found that this line in config.js appears to be causing this duplication; config.uploadAppPath = config.baseUrl.substr(0, config.baseUrl.length - 1) + config.uploadAppPath; and by commenting it out, I was able to use the URL /securedownload/upload/ without issue. This change was made in this commit

Other notes about my configuration;

So far I haven't found a reason why nginx would be the issue here, but I'm not 100% sure since I'm not an expert.