I'm trying to force the download of a file instead of displaying it in a browser and the below code allows me to download the file, but seems not to get the full file. I can not display any of the jpgs that I download. Any ideas on what I have wrong? Keep in mind images may be just one type of a download, as there could be .txt or .pdf etc...
My script downloads but the image will not display.
I run Ray's script above and it works.
Ray Paseur
Dave, thanks. I updated the older version recently and added better comments for my teaching library. In most cases, either version would work correctly.
keith1001
ASKER
Sorry for the delay, and thanks again for your support and working code/answer.
File is not downloading because you are saying browser that connection is closed. After receiving this header browser closes connection.