- 0
php Using header() to force download not working in Chrome or Firefox
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
WordPress-Theme Twenty Twenty Four-customizing: how to do that - a Gutenberg special question...
By thedhubs,
- 1 answer
- 1,219 views
-
- 3 answers
- 4,646 views
-
QNAP issues patch for an RCE security vulnerability affecting PHP in NAS Drive management
By Alap Naik Desai,
- remote code execution
- rce
- (and 12 more)
- 0 replies
- 18 views
-
Get this Dynamic 2022 Data & IT Security Training Bundle at 97% off
By News Staff,
- neowin deals
- cyber security
- (and 4 more)
- 0 replies
- 12 views
-
Save 98% off this 27 Course Premium Learn to Code Certification Bundle
By News Staff,
- neowin deals
- coding
- (and 10 more)
- 0 replies
- 15 views
-
Question
game_over
I have created an mp3 downloader script which forces downloads of MP3s that are located outside of the web root. I've received a few support requests saying it's not working.. I originally only tested it in Safari and it worked fine, so I tested it in Chrome and Firefox and can confirm it returns a 404 error in both of those browsers.
In Chrome console it shows: net::ERR_INVALID_RESPONSE
download.php:
I have checked all paths and variables.. everything is set, exists and readable.
If i remove application/force-download and application-download it loads the in browser mp3 player but returns a 404... so it looks like it can't find the file outside of web root - does Chrome/Firefox not allow that?
It is definitely working in Safari
Any ideas?
Link to comment
https://www.neowin.net/forum/topic/1269138-using-header-to-force-download-not-working-in-chrome-or-firefox/Share on other sites
4 answers to this question
Recommended Posts