X-Sendfile is a special header that if it contains a path to a file,
the webserver will ignore everything in response.body and serve the
file that X-Sendfile header points to.

You can read more about it in a recent post.
http://groups.google.com/group/web2py/browse_thread/thread/69c871c1f9d89d62#


TABLE is just one of the many web2py html helpers. Read
http://web2py.com/book/default/section/5/2

--
Thadeus





On Thu, Apr 22, 2010 at 10:52 AM, greenpoise <danel.sega...@gmail.com> wrote:
> I am guessing the helper is TABLE? How would I use it though? I used
> glob instead of listdir to predefine wildcards and it worked fine.
> What is X-Sendfile?
>
>
> thanks
>
> Dan
>
> On Apr 22, 11:35 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
>> Yes, for the view. It is web2py helpers constructing valid XHTML code
>> that is properly escaped.
>>
>> Also, for situations like this, the X-Sendfile header would be perfect !
>>
>> --
>> Thadeus
>>
>> On Thu, Apr 22, 2010 at 9:25 AM, greenpoise <danel.sega...@gmail.com> wrote:
>> > It works. Thanks. Is this TABLE(*[TR(TD(f)) for the purpose of the
>> > view?
>>
>> > On Apr 22, 10:01 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
>> >> just make sure you NEVER do os.chdir() that is not thread safe and
>> >> breaks web2py.
>>
>> >> On Apr 22, 8:49 am, greenpoise <danel.sega...@gmail.com> wrote:
>>
>> >> > will try and post. Thanks
>>
>> >> > dan
>>
>> >> > On Apr 22, 9:39 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
>>
>> >> > > something like this?
>>
>> >> > > def folder():
>> >> > >     import os
>> >> > >     return dict(files=TABLE(*[TR(TD(f)) for f in os.listdir('/
>> >> > > path/')]))
>>
>> >> > > On Apr 22, 7:48 am, greenpoise <danel.sega...@gmail.com> wrote:
>>
>> >> > > > I want to display the contents (files) of a folder and be able to
>> >> > > > click and download the files. How is this accomplished within a
>> >> > > > controller? leads? any examples out there? I know there is os.path,
>> >> > > > os.listdir and glob. Do I have to import the modules in Web2Py?
>>
>> >> > > > Thanks
>>
>> >> > > > --
>> >> > > > Subscription 
>> >> > > > settings:http://groups.google.com/group/web2py/subscribe?hl=en
>

Reply via email to