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

Fixed an issue where extra data was appended to end of downloaded file #56

Merged
merged 1 commit into from Dec 8, 2023

Conversation

cdg191
Copy link
Contributor

@cdg191 cdg191 commented Jun 9, 2023

Fix issue #55 for extra data appended to end of downloaded file

This is the code I've always used for file downloads in ASP.Net. I'm unclear why the original code, which calls a native Response method, misbehaves. I do know this code hasn't failed me to date.

Although I suggest wrapping it in a try/catch, as if the user cancels the download dialog it throws an exception in the module.

Description of PR...

Changes made

  • ReWrote StreamFile.

PR Template Checklist

  • Fixes Bug
  • Feature solution
  • Other

Please mark which issue is solved

Close #55

Fix issue DNNCommunity#55 for extra data appended to end of downloaded file
@WillStrohl
Copy link
Member

Nice contribution! A quick question, though... Shouldn't the content-type remain in place to help browsers to know how to handle the stream properly?

@valadas
Copy link
Member

valadas commented Dec 8, 2023

@WillStrohl content-type is still there but it is using the property instead of the method. This looks good to me. Merging.

@valadas valadas added the bug Something isn't working label Dec 8, 2023
@valadas valadas changed the title Update Helpers.cs Fixed an issue where extra data was appended to end of downloaded file Dec 8, 2023
@valadas valadas added this to the 4.1.2 milestone Dec 8, 2023
@valadas valadas merged commit e1b1a2a into DNNCommunity:develop Dec 8, 2023
1 check passed
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.

Files downloaded have extra data appended to the end of them
3 participants