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

@alexdetsch alexdetsch commented Jun 12, 2019

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

@jupyterlab-dev-mode jupyterlab-dev-mode bot commented Jun 12, 2019

Thanks for making a pull request to JupyterLab!

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

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented Jun 12, 2019

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

@alexdetsch alexdetsch commented Jun 12, 2019

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

@jasongrout jasongrout commented Jun 12, 2019

Awesome, thanks!

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented Jun 12, 2019

This works great, thanks!

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

@jasongrout jasongrout commented Jun 20, 2019

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

@lock
Copy link

@lock 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants