New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Local Filestorage returns wrong URL after upload #2563

halfdan opened this Issue Apr 6, 2014 · 0 comments


None yet
2 participants
Copy link

halfdan commented Apr 6, 2014

Issue Summary

When using Ghost with a custom defined content directory the local filestorage will return

Steps to Reproduce

  1. Use the custom config from where the contentPath is changed.
  2. Try to upload an image.
  3. Ghost will return a path that contains part of the local file system path.

The URL uses part of the path of the local filesystem. The implementation uses imagesPath instead of the correct imagesRelPath in to construct the URL to the uploaded image.

This image can be flagged as beginner. Tests should however be added to make sure we don’t break this again in the future.

Technical details

  • Ghost Version: master - latest commit: 9e358fb

@ErisDS ErisDS added this to the 0.5 milestone Apr 6, 2014

@ErisDS ErisDS added the bug label Apr 6, 2014

jaswilli added a commit to jaswilli/Ghost that referenced this issue Apr 7, 2014

Build correct path on image upload when config has custom content path
closes TryGhost#2563
- build path relative to imagesPath (which contains the custom content path)
  instead of appRoot
- added test for custom content path
- added logic to tests for Windows url building to handle cases where Windows
  functionality is being tested on a unix operating system

@ErisDS ErisDS closed this in #2566 Apr 7, 2014

@ErisDS ErisDS modified the milestone: 0.6 Apps Sep 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment