Visitor access to database

P

Paul Evans

Here's the scenario: a visitor enters a website and uploads a file to a
database on the server. Simple so far! Now, how do you create a web page
that automatically creates a hyperlink to this file for other visitors to
access? There could be several uploads each day and I want visitors to be
able to access these files instantaneously! Is this possible?



Thanks
 
M

Mike Mueller

Paul,
Files are not uploaded to a database. MS has a KB article
that tells how to do it:
http://support.microsoft.com/defaul...port/kb/articles/q218/6/06.asp&NoWebContent=1



Paul Evans wrote:
: Here's the scenario: a visitor enters a website and
: uploads a file to a database on the server. Simple so
: far! Now, how do you create a web page that
: automatically creates a hyperlink to this file for other
: visitors to access? There could be several uploads each
: day and I want visitors to be able to access these files
: instantaneously! Is this possible?
:
:
:
: Thanks
 
J

Jens Peter Karlsen[FP MVP]

I assume you mean that they upload to a folder on the Server. To store a
file in a database while possible is difficult and if you had that kind
of skills you should have no problem in creating a download option.
Anyway, the simplest way is to allow directory browsing on the folder
and simply link to the folder.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
K

Kevin Spencer

A visitor uploading a file to a database on the server is simple? Have you
tried to build this part yet?

You would need to write a custom ASP application/script to do this. However,
I can't tell you any more than that at present, due to lack of information.
I need to know first, are you really storing these files in a database? If
so, why? It is much simpler (truly) to store the file in the file system,
and the file name in the database. Second, you haven't specified what KIND
of files the users are uploading. How you "display the files" depends upon
what kind of files they are.

In answer to your final question, certainly, it is possible. If you provide
us with more detailed information, we can help you to know what needs to be
done. Whether or not you have the programming skills to do it is another
question which I can't answer.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
J

Jeff

maybe use this... and fill in the data you need

<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0>
<TR BGCOLOR="#000000"><TD><FONT
COLOR="#FFFFFF"><B>Filename:</B></FONT></TD><TD><FONT
COLOR="#FFFFFF"><B>Size:</B></FONT></TD><TD><FONT COLOR="#FFFFFF"><B>File
type:</B></FONT></TD><TD><FONT COLOR="#FFFFFF"><B>Date
created:</B></FONT></TD>
<%
' Create an instance of the FileSystemObject
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
' Create Folder Object
Set MyFolder=MyFileObject.GetFolder(Server.MapPath("/yourfolder"))
'Loop trough the files in the folder
FOR EACH thing in MyFolder.Files
%>
<TD ALIGN=RIGHT bgcolor="#000000"><%=thing.Size%>bytes</TD>
<TD bgcolor="#000000"><%=thing.Type%></TD><TD
bgcolor="#000000"><%=thing.DateCreated%></TD>
<%
NEXT
%>

this is what i use on mine.
Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top