Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outputting data for download to XP client?

Status
Not open for further replies.

BobMCT

IS-IT--Management
Sep 11, 2000
756
US
We have several scripts that will send records to a requesting browser and all has been working well. However, if the end user is on XP they cannot save the file to their ntfs disk. They can, however, download the same file from other site(s) without the same error. My guess its something in the mime-type header.

Here's what our script(s) send now:

print "Content-Type: application/x-qif\n"; print "Content-Disposition: attachment; filename=\"$FILE\"\n\n";

Does anyone have experience with this issue and any ideas as to what might have to be changed to resolve this issue?
 
Try adding a second "newline" after

print "Content-Type: application/x-qif\n";

(print "Content-Type: application/x-qif\n\n"; ) There's always a better way...
 
Thanks tviman;

I don't know why but that little trick seemed to get by the "permissions" thing. But now - next issue:

Here's what I changed the output to (see the additional \n) but the filename setting doesn't seem to have any effect in IE5.
Let's say the $FILE field contains "C:\abc.qif" the file is actually being stored in the "temporary internet files" under some generated name.

How does one go about forcing the name now?

print "Content-Type: application/x-qif\n\n";
print "Content-Disposition: attachment; filename=\"$FILE\"\n\n";
print "!Type:Bank\r\n";

Thanks- and this should be the end of this issue.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top