Skip to content

Fix relative paths for uploads#34

Merged
roschaefer merged 1 commit intomasterfrom
fix-relative-paths-for-uploads
Mar 29, 2019
Merged

Fix relative paths for uploads#34
roschaefer merged 1 commit intomasterfrom
fix-relative-paths-for-uploads

Conversation

@matboehm
Copy link
Copy Markdown
Contributor

Fix relative paths for uploads, so uploading and serving profile images works with any user running the node server.

When deploying the current code and running it with my user via pm2, I had the problem that the uploaded files couldn't be accessed an served.
In order to fix this, I had to change the paths, taking the current directory into account. See also https://expressjs.com/en/starter/static-files.html (last paragraph).

This is the code that I changed on the server to make it work. For consistency of course I also update the git repo with the code.

…ving profile images works with any user running the node server
@matboehm matboehm added the bug Something isn't working label Mar 28, 2019
@matboehm matboehm self-assigned this Mar 28, 2019
@matboehm matboehm requested a review from roschaefer March 28, 2019 17:38
Copy link
Copy Markdown
Contributor

@roschaefer roschaefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@roschaefer roschaefer merged commit 920e0c4 into master Mar 29, 2019
@roschaefer roschaefer deleted the fix-relative-paths-for-uploads branch March 29, 2019 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants