[cgiapp] redirect/content type

2008-06-11 Thread Benjamin Hitz
This is probably a vanilla CGI question, but I am working under CGIapp so here goes. I have a cgi::app that shows a table. I want to have a link which generates a plain text (tab delim) version of the table, and pops up a save as window. Prior to cgi-app we just wrote a temp file on

Re: [cgiapp] redirect/content type

2008-06-11 Thread David Baxter
Hi Ben, We have a runmode that does almost exactly what you want. It lets the user download a csv file onto their PC with the correct filename. The code we use is below. $self-header_props( -type = 'text/csv' ); $self-header_add( '-content-disposition' = attachment; filename=$filename

Re: [cgiapp] redirect/content type

2008-06-11 Thread Ron Savage
Hi Ben Some way to set BOTH a redirect and a content-type? Or simply fake the name name of the file? I don't have a redirect, but here's how I let users download search results: sub download_staff_list { my($self) = @_; my($entity_id) = $self - session_param('entity_id'); my($data)

Re: [cgiapp] redirect/content type

2008-06-11 Thread Rhesa Rozendaal
Benjamin Hitz wrote: This is probably a vanilla CGI question, but I am working under CGIapp so here goes. I have a cgi::app that shows a table. I want to have a link which generates a plain text (tab delim) version of the table, and pops up a save as window. I can recommend