samvera-deprecated / curation_concerns

A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on Hydra::Works) and providing a generator for defining object types with custom workflows, views, access controls, etc.
Other
15 stars 27 forks source link

Disable Turbolinks for File Downloads #1063

Closed no-reply closed 7 years ago

no-reply commented 7 years ago

Fixes #1050.

Turbolinks causes xhr requests on local links. For file downloads, this causes browsers to render the contents as text, instead of playing media or displaying the PDF in a viewer. This disables it for the download links.

Related proposed changes:

@projecthydra/sufia-code-reviewers

no-reply commented 7 years ago

Seems like _new has been in use from the start: https://github.com/projecthydra/curation_concerns/commit/9d8ebf17b761946ab74576def080504d490d5737

dunn commented 7 years ago

This is the link responsible for the behavior in #1050: https://github.com/projecthydra/curation_concerns/blob/master/app/views/curation_concerns/file_sets/_show_actions.html.erb#L2

no-reply commented 7 years ago

@dunn thanks! I guess I had misunderstood about this being specific to the "Download This File" link. 052bf28 fixes it for that link.

no-reply commented 7 years ago

Rebased and force pushed to more clearly handle the various problems at play, here. I'm happy to break this into multiple PRs, if that's best.