Results 1 to 3 of 3

Thread: Dynamic File Download

  1. #1
    Join Date
    Dec 2007

    Question Dynamic File Download

    I've looked around the web and this forum for an answer to this question without any luck. I'm hoping the experience of everybody here can help me.

    I have a script that creates a tarball of files on a system. Right now my page let's the user click on a link that executes the script. Then the page refreshes with a link to the file that gets created. I'd like to have the user click once and the file gets created and a "Save" window pops up for the user.

    Ultimately, I want to be able to automate the grab of this file via wget so that you don't have to visit the page to grab it.

    Does anyone have any suggestions for me?

  2. #2
    Join Date
    Dec 2007
    Pls see RFC HTTP 1.1 Protocol

    Just send head:

    1 'Content-Type:' ... The file's MIME-Type

    2 'Content-disposition: attachment; filename="The filename string..."

    3 'Content-Length: bytes of filesize..'

    and then

    Send body of the file..

  3. #3
    Join Date
    Dec 2007

    Thumbs up

    That worked perfect.

    Thanks so much.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center