-
Notifications
You must be signed in to change notification settings - Fork 238
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
PDF document filename with inline downloads #388
Comments
Honest answer: I don't know. The download logic was refined many times over the years and is based on the official PHP manual for readfile(). It should work - but browsers sometimes change their behavior so I just can't tell. You can find our implementation here: https://github.com/mikehaertl/php-tmpfile/blob/master/src/File.php#L95 What you could do:
If you find a combination that works you can report it here and we can see if we can improve the situation. |
@christatedavies Any news here? Did you have a chance to reproduce the issue with a custom PHP script? |
Hi Mike. Not really, it looks like its an issue with the browser and how you can tell the browser to download or prompt. I don't fully understand it personally. |
Ok. I'll leave this open for now. If you or someone else finds a way feel free to post an update here so we can add it to the lib. |
Hello there
I have found that if I run the following code:
Then the PDF is automatically downloaded, with the correct filename. this is great
However, if I want the user to be able to view the PDF first, by using this:
Then when the user saves the PDF, the filename becomes "document.pdf"
Is this a limitation of the browser? I'm using Firefox in this instance.
Thanks, Chris
The text was updated successfully, but these errors were encountered: