Of course you can always do something that gets the filename from the GET or POST request: i.e.
http://www.myapp.com/get/some/data/here?filename=frobnicate.csv or POST equivalent. I'd post some code illustrating this, but it should be obvious. Besides, I left the power supply for my dev laptop at work over the weekend ;) On Nov 11, 2007 6:18 PM, A. Pagaltzis <[EMAIL PROTECTED]> wrote: > * Octavian Rasnita <[EMAIL PROTECTED]> [2007-11-09 15:47]: > > If I try to save the file pressing enter on the link to > > download the file, the window that asks me if I want to save it > > appears, but after I press the "Save" button, nothing happends, > > and it doesn't ask me for the name of the file. > > That's not something you can affect from HTTP. It's the way your > browser implements that aspect of HTTP. Apparently if you don't > explicitly tell it that you want to save something under a > different name from the one in the URI (or the header, in this > case), it won't ask you for a name. > > I admit, I personally like that. I remember the days when the > "Save As" dialog was routinely popped up, and how that made it > much more of a hassle to download things. > > I think most browsers can be configured to ask if you really want > them to. I never bothered to look for such a setting though. > > > Can you tell me what other headers do I need to print, > > There is no way to do that with HTTP headers. Even the > Content-Disposition thing is really just a MIME thing that HTTP > inherited from internet mail. In mail, it doesn't make sense to > have an part of the mail that prompts you for printing instead > of being displayed as an attachment. > > On HTML pages, you can use Javascript to invoke the browser's > print dialog. Many "printable version" templates on sites on the > internet have that. For other media types, you're out of luck. > > > or what else should I need to do in order to be able to save > > the file by just clicking the link (pressing enter on it)? > > Well, you already can. It's just the browser vendor decided not > to offer UI to change the filename in such a case⦠> > Regards, > -- > Aristotle Pagaltzis // <http://plasmasturm.org/> > > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ > Dev site: http://dev.catalyst.perl.org/ > _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
