Syed Anwaruddin wrote:
>
> Hi ALL,
>
> I have an application where I get a *.tar.gz file. Now I want this file to
> save it on my client System. I am using an application:
> print "Content-Type: application/x-zip-compressed\n\n"; to save the file.
>
> This application will pop up a Save As dialog box. In this Dialog Box there
> is a Selection field.
>
> Right now, when I am trying to save the file, my URL location path ( say
> /users/syed/assembly.pl)is coming as default in Selection field of the
> application Dialog Box. I want my file say /users/syed/*.tar.gz in the
> Selection field of Appliaction Dialog Box(x-zip-compressed).
>
> Pardon me If I am wrong. I don't know how to get my file in Selection Dialog
> Box. Please help me on this.
>
> I want this to work on both UNIX and NT.
It's not the OS, it's the browser. Try this for the download portion
(I assume you're downloading from the Perl script - note the headers):
... code...
my $path = 'c:/rootdir'; # example path to files
my $file = 'image.gif'; # example (or get from args)
my $mimetype = 'image/gif'; # example (or create hash for .ext)
my $attach = 'attachment'; # or 'inline' for an image
my $size = -s "$path/$file";
$size or die "$path/$file: empty file";
open IN, "$path/$file" or die "$path/$file download: $!";
binmode IN;
# the 3 headers below are important in the scheme of things since MSIE
# likes to use the file ext to determine the content-type
print <<EOD;
Content-type: $mimetype; name="$file"
Content-disposition: $attach; filename=$file
Content-length: $size
EOD
# no quotes around $file after Content-Disposition header for MSIE ?????
binmode STDOUT;
print <IN>;
close IN;
... more code...
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.webjump.com/ (Free Perl site)
-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web