veiwing upload files

  • Thread starter Thread starter Mike Bennett
  • Start date Start date
M

Mike Bennett

Hi I have a web page that has a password protected sub web. In that sub
web, I have a file upload form on a page. I have set the file uploads to
go a folder called file_upload within the sub webs folders. How do I get
that uploaded file say an .mpg to show up on a new page so that people
who are allowed into the sub web are able to see it and download it?

Thanks,

Mike Bennett
 
Hi Mike,

Since the files are being uploaded via browser, obviously you can't just
have links to them. There are several ways of doing this, depending upon
your skill set. One is to write a server-side application using ASP,
ASP.Net, or some other less cool server-side technology. You could create an
ASP page that displays the contents of the folder in any way you choose. The
other and simpler way is to use the IIS configuration to allow "Directory
Browsing." Directory Browsing is a behavior of web servers that can be
turned on and off, and is typically turned off for security reasons (you
usually don't want anyone to be able to see and/or download ANY file in your
web site - just the ones you want them to). The way Directory Browsing works
is this: When a request is made for a folder without specifying the file
name desired, the web server can use various "default" home page file names
(such as default.htm, index.html, etc) to provide a default page for that
folder. This is how your home page for your web site works. If no file
exists in that directory with that name, and if Directory Browsing is
permitted, the server can return a page with a list of the files in the
directory, with a link on each file to request it by name. If Directory
Browsing is not permitted, the user gets an error page indicating that
Directory Browsing is not allowed.

Therfore, if you just turn on Directory Browsing, and make sure that (1)
every other folder in your web site has a default document in it, so that
nobody will be able to browse those directories, and (2) The upload folder
does NOT have a default home page in it (so that they CAN browse it), you
would be able to display the files in that manner, by simply including a
link to the folder.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top