-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Content-Disposition filename ignored somehow #6396
Comments
The Content-Disposition header is currently not parsed. Patches are welcome! If you're interested:
|
@Rob--W oh I thought it is cause of some issue's. However if' just appended a &filename="name.pdf" to my url I think that parsing it wouldn't be too trivial for my use case. |
Does this still need work? I would love to make this my first contribution to oss |
@jumbosushi This still needs work indeed. A few comments back I have described the steps that you can follow to implement this feature. If there's anything unclear, feel free to ask. |
@Rob--W Would like to give this a try if it's still open. |
@corblanc This is still open, thanks for giving it a try! The invitation to ask questions is also still open. |
@Rob--W Great! Mind if I shoot you an email? Bit new to all of this. |
@corblanc Go ahead. You can also join us at #pdfjs on irc.mozilla.org if you want to have a conversation. (edit: irc.mozilla.org, not Freenode) |
Any updates on this? Thanks! |
This is still an issue, for me at least. Any updates? It's been over a year. |
Hey guys, im new to OSS and this would be my first contribution. The tag looks open. How can i contribute and any guidance is very much needed and much appreciated. Thank you. |
See #6396 (comment) I have recently written a simple yet complete Content-Disposition parser, its functionality can be reused: https://github.com/Rob--W/open-in-browser/blob/master/extension/content-disposition.js |
Note that there is already a pull request for this issue above (and it's almost finished), hence I would suggest working on another issue instead. |
Got it. Thank you.
…On Sat, Jan 6, 2018 at 8:26 AM Tim van der Meij ***@***.***> wrote:
Note that there is already a pull request for this issue above (and it's
almost finished), hence I would suggest working on another issue instead.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6396 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKLkdZli8v_UDNN3Tkj50RGt4bna_zwgks5tH3R9gaJpZM4F0KLh>
.
|
Fixed in #9379. |
Has there been regression on this? I am trying to open a base64 pdf from an tag. I set the "download" attribute to the filename which correctly names the PDF on chrome, but with the pdfjs opener in firefox it shows only "document.pdf". If I set the:
The above too is ignored by pdf.js and I just see:
Why does pdf.js still ignore the Content-Disposition and download attribute in the a tag. Is this regression? Are there any known workarounds for JSON base64 responses? |
@ddemoss222 For future reference: Note that it's always recommended to open a new issue, rather than commenting on one that was closed many years ago, since it's often very easy for comments on old issues to be overlooked/ignored. Without a runnable test-case it's difficult (or rather impossible) to know for sure, but this is likely fixed by the PR referenced above. |
Hello, currently I render my Browser documents with PDFJS however I have patched the viewer.js to support my Authorization header i just added httpHeaders to paramters before PDFJS.getdocument so nothing special, however PDFJS ignore's my Content-Disposition Header which has a filename=
it always gives me document.pdf
I tested against a CORS version and non cors currently this is my content-disposition:
Is there a setting that it should use this filename or do I miss something?
Currently it isn't related to #2407 since that will work on save + s.
However on my side either Firefox/Chrome nobody gets the correct content-disposition i tried:
Also that's the Code I added in viewer.js starting after Line 6373 and the PDFJS line is already there:
btw. I could also set the filename by myself, I think of the possibility that I know the filename already.
The text was updated successfully, but these errors were encountered: