I'd probably have two pages, the first one that takes the users input (depending on your application could be plain HTML), the second (CGI script) that returns the content type for the tar file (I'd have to RTFM for the correct Content-type:) and the file itself.
Since the browser is being fed the Content-type: for a tar file, it will handle it as the user expects (normally by offering to download it).
Changing the Content-type: header is demonstrated in the CGI docs.
Hope that helps.
BazB.
Update: merlyn's column, referenced here suggests Content-type: application/x-tar-gzip (for a .tar.gz file).
application/x-gtar or application/x-tar might also be applicable if the tarball is not compressed.
In reply to Re: Downloading a dynamically created file
by BazB
in thread Downloading a dynamically created file
by ropey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |