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

Added download attribute to Download context menu option #6546

Merged
merged 1 commit into from Jun 12, 2019

Conversation

alexdetsch
Copy link

References

Code changes

When downloading html-files via the context-menu option, the file just opens in a new browser-tab instead of getting downloaded. To prevent this, we tell the browser explicitly, that we want to download that file.
Added HTML5-download-tag to Download.

User-facing changes

Backwards-incompatible changes

@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@jasongrout
Copy link
Contributor

Nice! For reference, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Attributes

How about we set the value as the filename? I think that's how the attribute works.

@jasongrout jasongrout added this to the 1.0 milestone Jun 12, 2019
@alexdetsch
Copy link
Author

When the value is left blank, the original filename of the file on the server is taken for that. So it already serve the correct filename.

@jasongrout
Copy link
Contributor

Awesome, thanks!

@jasongrout
Copy link
Contributor

This works great, thanks!

@jasongrout jasongrout merged commit 9e42176 into jupyterlab:master Jun 12, 2019
@jasongrout
Copy link
Contributor

Looks like this effectively reverted #6139, which is now causing us problems (see #6658).

@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related discussion.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
@jasongrout jasongrout added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants