Skip to content

On Windows, files served with backward slash in the name #67

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

Open
menesis opened this issue Feb 10, 2025 · 0 comments
Open

On Windows, files served with backward slash in the name #67

menesis opened this issue Feb 10, 2025 · 0 comments

Comments

@menesis
Copy link

menesis commented Feb 10, 2025

If upload_to parameter of FileField is set, the name attribute of File model contains a slash. Since this is relative path on the filesystem, on Windows this is a backward slash (\). This may not be a problem, however, it is passed unchanged to url() and the resulting file URL contains a mix of forward and backward slashes. When using URL_METHOD_2, it is even escaped.

menesis added a commit to menesis/django-binary-database-files that referenced this issue Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant