[ic] displaying directory contents

Tom Luong interchange-users@icdevgroup.org
Wed Mar 26 17:12:00 2003


--- Paul Jordan <paul@gishnetwork.com> wrote:
> >
> > I would like to allow users to upload files (newsletters -
> > pdf's), and setup
> > an interchange page to display the content of the folder so that customers
> > can download them.
> >
> > How can I do this?
> >
> > Any feedback will be appreciated.
> >
> > Thanks,
> >
> > Chris
> 
> 
> Hi Chris, I can't help you with the upload part, but as for the downloads, I
> suggest integrating the "upload" portion with a database record or some
> sort, with the files end location. It then just becomes ITL/HTML. I say this
> becuase I looked into perl scripts for displaying (listing) contents of
> folders for a user and it seemed to come down to AllowGlobal would have to
> be set, which is not recommended.
> 
> Paul

Hi Chris,
I have done similar to that.
you can have users upload documents via a form and have the name file name put
into a "uploaded files" database. you will need to something like
<form METHOD="[process-target]" enctype="multipart"> or something like that, I
cant remember off hand. and simply have a loop on a page that looks like the
following
[loop search=|
fi=uploaded_files
st=db
ra=yes
rf=name or code or whatever you want
]
<a href="[area search=|
fi=uploaded_files
st=db
sf=name
se=[loop-code]
|]">[loop-code]</a><br>
[/loop]
you know what, I am not thinking well right now. but that should get you headed
in the right direction. let me know if you need any help.
you may need to look at autoincrementing your table when people upload the
files that way everyone has a unique primary key.

Good Luck,
Tom

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com