Answering my own ambiguous question.

What I want is a way to display folders and files on server side, and
allowing user to conveniently browse them. INPUT(_type='file') looks
like what I want, but it is not, because INPUT(_type='file') can only
browse files on client side. Finally I use this jquery File Tree
plugin (http://abeautifulsite.net/2008/03/jquery-file-tree)

Just for your information.

Regards,
Iceberg

On Apr23, 12:30am, Iceberg <[email protected]> wrote:
> Sorry for chime in. Do you guys have a convenient way to input a file
> path via browser? I've tried these.
>
> 1) INPUT(_name='the_path') # User have to type it
>
> 2) INPUT(_name='a_file', _type='file')
> This is assuming that the web server is running on local machine as a
> desktop application. However, in old days the file object contains
> path info, but that is no longer the case in recent browsers.
>
> 3) So I guess I have to somehow design a dedicated interface to
> "browse" the directories on my server. Or does it already exist
> somewhere?
>
> Do you have better way?
>
> Regards,
> Iceberg
>
> On Apr22, 9:39pm, mdipierro <[email protected]> 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 <[email protected]> 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