-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add Download file
action to file meatballs button
#1011
Add Download file
action to file meatballs button
#1011
Conversation
cb193c6
to
afd23e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second everything @kinglozzer has said.
The "insert a link on the page and click on it" method feels kind of weird, but can't find a better way to trigger a download in JS.
Have you given some thoughts about trying to make the Download action an actual link? This would seem like the ideal approach. Would probably require more work, but it could be reuse in other places.
It would be nice to have some test coverage of this, but I'm not sure there's a nice elegant way of asserting that "my browser asked me to download this file". Seems like there's some way to do it in Behat but I haven't tried it.
afd23e5
to
14995b0
Compare
It can be done with a |
Using a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost done. I still have a bit of an issue with the focus, but all my other concern have been addressed.
I tested in Chrome, Firefox and IE11. It all works fine. Note that in IE11, it wants to display the images rather than download them. You might be able to force IE to download the files by adding a |
I think this relies on browser settings and response headers in order to work. |
Apparently IE doesn’t support the |
ccbb7a4
to
82070d6
Compare
82070d6
to
94600d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works like a charm now. I've rebased this guy and sqashed all the commits.
Merge on green
No description provided.