This topic is READ ONLY
import-bot (20211) [Avatar] Offline
#1
[Originally posted by mckan]

Hi,

If I want to return a file from NVO function after processing user request,
how can I do that?
Generally, the function can return string (html format), BLOB, etc, what type
should I declare, if I want to return a file, and user can save or open it by
browser, just as we download a file from web.

regards,

Peter
import-bot (20211) [Avatar] Offline
#2
Re: Can the object function return a file to browser?
[Originally posted by johnlatham]

I think you would have to return the html for the link to the file on your web
server rather than the file itself. Have a look at the downloads on the web
for the syntax.

> Hi,
>
> If I want to return a file from NVO function after processing user request,
> how can I do that?
> Generally, the function can return string (html format), BLOB, etc, what type
> should I declare, if I want to return a file, and user can save or open it by
> browser, just as we download a file from web.
>
> regards,
>
> Peter
import-bot (20211) [Avatar] Offline
#3
Re: Can the object function return a file to browser?
[Originally posted by ezad1]

You could do that, or, have your function return a blob and send back the http
header:

content-type: application/octet-stream


> I think you would have to return the html for the link to the file on your web
> server rather than the file itself. Have a look at the downloads on the web
> for the syntax.
>
> > Hi,
> >
> > If I want to return a file from NVO function after processing user request,
> > how can I do that?
> > Generally, the function can return string (html format), BLOB, etc, what
type
> > should I declare, if I want to return a file, and user can save or open it
by
> > browser, just as we download a file from web.
> >
> > regards,
> >
> > Peter