Skip to content
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

Absolute image paths are overwritten #32

Closed
codingisfun007 opened this issue Nov 30, 2020 · 2 comments
Closed

Absolute image paths are overwritten #32

codingisfun007 opened this issue Nov 30, 2020 · 2 comments
Labels
bug Something isn't working fix_available

Comments

@codingisfun007
Copy link

Problem

I've got an issue with absolute image paths. Images with an absolute path (e.g. /im/test.png) are turned into (.//im/test.png), which results in errors because the path is invalid and images cannot be found.

Cause

The error caused by these lines of urls.py:

if directory_urls:
new_url = '../' + new_url

Proposed Fix

Replace
new_url = '../' + new_url
with
new_url = os.path.join('../', new_url)
to prevent absolute paths from being overwritten.

@timvink timvink added the bug Something isn't working label Dec 9, 2020
@timvink
Copy link
Owner

timvink commented Dec 21, 2020

Should be addressed in v1.0. Let me know if it's fixed for you.

@codingisfun007
Copy link
Author

Fixed! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix_available
Projects
None yet
Development

No branches or pull requests

2 participants