There isn’t a way to change the content-disposition, but there are previewers for pdf and other file types. You can follow the instructions at https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers to set up the pdf previewer (and others that you might want.) These were implemented as of Dataverse v4.11, but there have been updates to display previews in the page (v4.18) and to separate how previewers and other explore tools are displayed (v5.2+). Note that there is a develop branch in that repository (https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers/tree/develop) that has updated instructions for Dataverse v5.2+.
-- Jim
--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dataverse-commu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dataverse-community/7ac1755d-ad2a-4496-a3dd-5d23fae763ccn%40googlegroups.com.
When users open PDFs from my dataverse installation, I'd like the response to encourage the browser to open the PDF inline rather than downloading it. As it stands, the only way to request the file is the "download" button which creates a response with content-disposition: attachment. I think if I could get it to do content-disposition:inline then we'd be good. Is there a way to do that with Dataverse?
--
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/798bf676-c91c-4239-932e-a4bdd04253a8n%40googlegroups.com.
FWIW: Later versions of Dataverse (>4.18) do open the PDF in the DataFile page rather than as a new window (you can still pop-out). That said, previewers are just tools using the Dataverse API so you can make any you want. The intent with the existing ones was to cover ‘most’ browsers, so relying on specific plugins wasn’t something we wanted to do, but if the browser’s pdf viewing is better, it could be that the existing previewer could be updated to do that if possible and, if not, default back to what happens now.
Feel free to discuss at the dataverse-previewers repo and/or to create a PR there if you think what you’re doing is of general interest.
-- Jim
From: dataverse...@googlegroups.com [mailto:dataverse...@googlegroups.com] On Behalf Of fooba...@gmail.com
Sent: Wednesday, October 6, 2021 4:10 PM
To: Dataverse Users Community
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/33cc1fb9-755c-439d-b65c-d8ac2eaf1221n%40googlegroups.com.