Re: PSP and output filename

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Wed, 28 Aug 2002 18:26:23 +0400
Message-ID: <akimiq$r9o$1_at_babylon.agtel.net>


Well, one pretty straightforward solution I can think of is this: you create a document table and document download procedure as per OWA docs, then in your PSP you generate a LOB with data you want, insert it into the document table with correct MIME type and other attributes and issue owa_util.redirect_url('/pls/DAD/docs/myfile.tsv') so that browser jumps to the new link, document download procedure picks up the file you generated and there you have it.

There are other solutions, but this one is guaranteed to work as it quite easy to implement.

-- 
Vladimir Zakharychev (bob_at_dpsp-yes.com)                http://www.dpsp-yes.com
Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
All opinions are mine and do not necessarily go in line with those of my employer.


"Tim Cross" <tcross_at_nospam.une.edu.au> wrote in message news:877kibcwt6.fsf_at_blind-bat.une.edu.au...

>
> I've just recently started looking at PL/SQL Server pages, which
> appear to provide some quick and easy web slutions for some of our
> needs. One thing which I managed to do in about 12 lines of code was
> create a PSP which would return a tab seperated file to the user which
> they can then either save to disk or open in an application, such as a
> spreadsheet.
>
> this all works fine, except for one minor problem. The default
> filename presented in the "save or open" box of the browser has the
> same name as the PSP. What I would like is for the file to have an
> extension which more accurately represents the file type - in this
> example *.tsv.
>
> If I was just using th web toolkit, I would create a package and
> create a procedure called tsv inside the package - this would then
> make the url something like http://host/pls/dad/package_name.tsv and
> the default filename at the browser end would become
> package_name.tsv. However, you cannot put PSPs into a package (unless
> you do it by hand, which sort of defeats using PSP).
>
> Can anyone think of how this could be achieved? I tried using a
> parameter to the contentType-= setting, but that just caused errors.
>
> The platform we are using is 8i (8.1.7), 9ias running under True64.
>
> Tim
> --
> find / -iname microsoft -exec rm -rf {} \;
Received on Wed Aug 28 2002 - 16:26:23 CEST

Original text of this message