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

Download files naming format and extension #51

Closed
pejacoby opened this issue Apr 30, 2023 · 2 comments
Closed

Download files naming format and extension #51

pejacoby opened this issue Apr 30, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@pejacoby
Copy link
Contributor

When downloading files from the web interface (1.1.0b1) they are saved with the double-extension ".csv.html".
Could that be just ".csv" instead? Minor issue but I end up renaming them all the time.

It would also be nice to have the filename be a timestamp, another element I end up adding to all files. YYYY-MM-DD would be plenty to add, as the file number keeps things unique. YYYY-MM-DD-HH-MM would be another option.

@JosephHewitt
Copy link
Owner

Thanks for opening this issue.

I've found the most likely culprit for the .html extension being added. The filename is set in the Content-Disposition HTTP header, however a somewhat conflicting Content-type: text/html is sent on all requests. Many browsers will use the unaltered filename as sent by the header, but some browsers will add .html since it has been told a HTML file is being sent. Most likely changing this to text/csv for the file download will fix the issue.

As for the date being added to the filename, I like the idea and it should be quite easy to implement.

I will work on this soon.

@JosephHewitt JosephHewitt self-assigned this Apr 30, 2023
@JosephHewitt JosephHewitt added the enhancement New feature or request label Apr 30, 2023
@JosephHewitt
Copy link
Owner

The correct Content-Type header is now sent with #52

The date is now included with the filename of a downloaded file with #53

These changes are now in main but a new beta version will be released soon with these changes. Thanks for opening this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants