"Octavian Rasnita" <orasn...@gmail.com> writes:

> From: "lee" <l...@yagibdah.de>
>
>> Hi,
>>
>> how can I make it so that my cgi program displays information on a web
>> page it sends to a user's web browser /and/ then makes the browser's
>> download dialog-box come up to let the user download a file?
>>
>> It seems that making the web browser wanting to download a file is only
>> possible by sending appropriate page headers.  Since those have already
>> been sent to display the text on the web page, I can't seem to make the
>> browser download the file automatically.
>>
>> -- 
>
>
> Hi,
>
> Just print the page in the normal way and add a meta element similar
> with the one below in the <header> section of that page:
>
> <meta http-equiv="refresh" content="0; url=http://site.com/file.zip"; />

How do you do that?  When using CGI, I don't really have much influence
on what's put into the header.

> After 0 seconds it will start the file download. If you want the page
> to display for a few seconds and only after that to start the file
> download, specify a bigger number of seconds.

The file is ready some time after the header has been printed: When the
uploaded file has 20000 rows, it currently takes about 45 minutes to
process.  Most files are below 300 rows, though, and take about a
minute.

The information on the web page that has been printed during creating
the file must not go away.  The file may be created or not, so I'd have
to put it into the header after the page has been rendered by the web
browser.  That probably won't work.  So I just need to be able to print,
or do, something that makes the web browser open it's downloading dialog
box right when the processing has finished and the file is ready for
download.

Maybe that isn't possible?


Currently, the files are being sent by email.  That leads to a workflow
which really sucks.  Displaying them in a table on the web page may help
a lot, but that would be a lot of work because different columns need
different alignments, colour is used for some fields, and it is unknown
how many columns there are before the file is finished.

The files are created as xlsx spreadsheets, and the user needs to look
at them to check the result.  Is there a function which can display xlsx
as a table on the web page, with correct colours and alignments?  That's
something I really don't want to program.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to