sending a file back to the client

Posted on 2003-03-05
Medium Priority
Last Modified: 2013-12-25
Hi there

I am trying to write a perl/cgi script we can use on our LAN to read a file do some stuff with it and then place the file back on the client (user) pc (in the directory they supply)

To get the file seems easy enough by using the "file" HTML field.

I have scratched around quite a bit and cannot seem to find an example on how to place the "final" file back to the client.

Help would be greatly appreciated
Question by:tarantino
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 48

Accepted Solution

Tintin earned 150 total points
ID: 8071149
You essentially have to get the client to save the file in the correct location.

Depending on the file type, just send the correct MIME type, eg:

print "Content-Type:  application/octet-stream\n\n";


Author Comment

ID: 8077689
Thank you Tintin
That helped, as I can figure: print "Content-Type:  application/octet-stream\n\n"; is used to open the "save file to disk" dialogue. I just need to still figure out how to link the correct file to it, but that should be easier to do, now that I learned something new in this already very new-to-me invironment of CGI.

thanks again


Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

765 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