Hi Friends,
I am designing a website where some users upload documents specific to some other users with whom they are related.
To come over the issue of replacing old files (because of common file names) we are adding a suffix to every file uploaded and storing the original name in DB. When the user tries to download the file, we are recreating the file temporarily with the original name, allowing the download and then deleting that file.
When I try to download and click on the file - Pop-up blocker is stopping the file download. How can we by-pass this feature and download it?
In some websites I observed that a new window is opened and user is displayed with "Open", "Save" "Cancel" buttons and if the user clicks on Open/save, download starts immediately and the new window is closed automatically. I want to apply such functionality. Please guide me.
regards,
Ravi.
File downloading Code
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: File downloading Code
Some of what you are describing is browser behavior and will be different in different browsers. You probably want to use a PHP script to do the download. Use the header() and readfile() functions.
(#10850)