Solved

CGI return of binary file

Posted on 1997-02-28
2
272 Views
Last Modified: 2013-12-25
I need a perl script that will return a binary file and cause the client browser to default to a file name of my choice.  Currently I am using a shell script and can't get the file to default to anything but the name of the script.  I have seen netscape call a script 'pick.cgi' and I get prompted on my browser to save the file as 'program.exe'.  That is exactly what I want.

Thanks.

Don;
0
Comment
Question by:bowendk
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
chump earned 50 total points
ID: 1827633
Use
echo location: ftp://ftp.site.com/program.exe
echo
echo
This will return the binary file called program.exe, the browser will prompt to save this file as program.exe

0
 
LVL 1

Expert Comment

by:chump
ID: 1827634
Sorry, with perl it's:

print "Location: ftp://ftp.site.com/program.exe", "\n\n";
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Edit Registry Key via Batch File 8 65
Simple JavaScript form question 4 75
Could you point how to deal with this kind of PHP notation? 7 107
Need to Modify a Script I found 5 99
If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question