[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [Kepler] Using Orbit to start a download
- From: Fabio Mascarenhas <mascarenhas@...>
- Date: Thu, 8 Oct 2009 11:41:58 -0300
You can use the serve_static method of your application object to send
a file to the client. It sets the content-type based on the extension
of the file you are sending. The syntax is
It returns the contents of the file, so just tail-call it in your
handler. serve_static also supports X-SendFile, if you set
use_xsendfile to true in your application object.
Fabio Mascarenhas, Lablua
On Thu, Oct 8, 2009 at 11:36 AM, RJP Computing <email@example.com> wrote:
> Since LuaForge is down I hope it is ok for me to ask Kepler and Orbit
> questions here.
> I am using Orbit in an application and I want to create a URL map to
> download files, like this "http://somesite.com/download/filename.zip". How
> do I make the browser think that it is time to download the file. I Googled
> and found a PHP article where it was using header(). How can I do this in
> Orbit. Thanks.