-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Can't download CSV attachment (just opens in browser) #8667
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
Comments
Maybe there should be a link to download as well as a link to display/render? #6089 is displaying the attachments better, maybe this could included there? |
Probably missing a |
Could well be missing that header. You wouldn't want it on all file types though, like images.. so would we define a list of types that do and dont, or leave it up to the end user by provided a link for both? |
I agree with @silverwind about the missing Content-Disposition header. Regarding inline content (e.g. images) that get a UUID for file name, maybe the following will work without losing its inline property:
It's a valid value, but I don't know how many browsers pick that up. |
I don't think |
I've just tested with a quick My crude
So, for files with an UUID as a name, it could be useful, especially if they are inline. I've also tested with the picture embedded in a page (which is what the inline keyword is for):
It works fine with the versions I've got in my PC of Firefox, Chrome, Edge and even IE. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
Hey |
I think it can be solved it via browser settings, for example in Firefox under Preferences - Applications, there should be an entry for the specific type. At least in 1.18, gitea will no longe force the browser to download for certain file types, like it did before. See #20484. You could also try to register the affected mime types in the mime map config and see if browser behaviour changes. |
[x]
):Blocked by Can't upload files on try.gitea.io #8666
Description
I'm trying to attach a CSV file to a comment but other users are having trouble downloading it to open in excel. It looks like its opened directly as text in the browser, and there is no way to download it with the original filename. (I can right click download it with the UUID filename but that has lost the .csv extension and confuses some users)
The text was updated successfully, but these errors were encountered: