-
Notifications
You must be signed in to change notification settings - Fork 751
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
File download in Resource Manager #5551
Comments
I believe this might be by design. Spaces, special characters, etc are NOT supported by all browser types and are not supported consistently across the board. @valadas any thoughts? |
FYI, I know that the Resource Manager module with v9.11.0 is new but I don't have this issue with the Resource Manager of the DNN v9.10.2. |
Very interesting. We may need to look into this one a bit further. Thanks so much for the detailed issue @ssanscar |
Hello... Just an FYI, that this is also discussed briefly in the DNN forums. |
I am not aware off-the-cuff of the code that might be adding those. In theory it should be able to download filenames with spaces in them. We'lll have to put a breakpoint and see why that is happeneing... |
Firefox doesn't add the underscores when downloaded. In my option, it would be nice if this behavior was consistent across the major browsers. My co-worker believes the issue is related to SSL authentication within the browsers. Safari also works fine on my iPhone. Edge and Chrome add the underscores. In Edge & Chrome you can get around this by using the "Copy URL" function and pasting the link in a new tab. (we had to add a certificate to our internal intranet in order to get the "Copy URL" function to appear. |
Closes dnnsoftware#5551 The string is quotes when there are spaces in the filement and Chrome replaced those with underscores. Filenames with special characters are encoded in the response. This adds a function to convert all those special cases back into a plain string that matches the actual filename in the frontend.
Description of bug
We can download files with the Resource Manager that names contains spaces, accents or special characters like parenthesis but the names of the downloaded files are renamed with underscore at the beginning and at the end of files.
Files without spaces, accents or special characters are downloaded successfully with the same name.
For the files with accents, the downloaded names is really weird like this:
=utf-8_B_UmFwcG9ydCBkdSBqdXJ5IHNvdXRlbmFuY2UgZGUgdGjDqHNlLnBkZg===.pdf
But, file name will always start with _=utf-8
Steps to reproduce
List the precise steps to reproduce the bug:
Current behavior
The downloaded file can be open on the desktop but we need to rename it if we would like that Windows recognize the type of file for open the good associated application of the downloaded file.
Expected behavior
Conserve the name of the file.
Screenshots
Error information
No errors.
Additional context
I tried with a lot of files.
If I have accents, spaces, or special characters, I have the issue. But if my files are no spaces, etc. the file name downloaded is right.
If I rename the file under the Resource Manager without spaces, etc. the file name downloaded is right. Conversely, if I rename the file under the Resource Manager with a space, etc. the file name downloaded has the issue.
I also tried with a new Uploaded file, and I have the same issue.
Affected version
Affected browser
The text was updated successfully, but these errors were encountered: