We help IT Professionals succeed at work.

CGI to password protect file donwload in

gorcutt
gorcutt asked
on
Medium Priority
181 Views
Last Modified: 2013-12-25
Hi,
I work with the MS IIS Web Server and I'm trying to do a script (in VB5) to send a byte stream to be downloaded on the client browser.
Actually, after the user authentication,  this script reads a file in a not shared folder (for security reasons) then it sends the contents to the client.
I’m sending the mime header  "content-type: application/octet-stream" so I can send any kind of data to be downloaded. The problem is: how to name the file that will be downloaded? The browser seems to name the file with the name of the script.  I wish to instruct the browser to name the file with the original name.

Thanks

Comment
Watch Question

Commented:
If your url of the script is such : http://host/path/1.cgi, then use this instead: http://host/path/1.cgi/filename

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Sorry for asking such a stupid question. It's obvious.
Thanks.


don't forget rating! :-)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.