Forum Moderators: mack

Message Too Old, No Replies

How can I let users upload files.

Upload files from a webpage.

         

Mushtaq khan

2:12 pm on Jul 18, 2005 (gmt 0)

10+ Year Member



I want to make a page where user can browse files to any folder on the local machine and then upload those files on the website. It is some thing like you browse files to attach to your email.

I want a browse button on my site and user can browse his local folders and upload files on the site(server) and then could see the link to that file, so any one else on different machine could click the link and download or open that file.
Can any one be great help plzzzzzzzz

coopster

2:19 pm on Jul 18, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, Mushtaq khan.

In your <form> tag you will specify the enctype="multipart/form-data" attribute and you'll need an <input type="file" /> tag. Something along these lines:

<form enctype="multipart/form-data" action="myformprocessingscript" method="POST"> 
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
It's the myformprocessingscript that is the most important part, though. It is where the data gets sent on the server for processing. What server-side technology are you using?

Mushtaq khan

2:27 pm on Jul 18, 2005 (gmt 0)

10+ Year Member



hey man, I appriciate your help, first of all I would like to let you know, I am very new in this web designing world. I am using dreamweaverMX and I dont know what is server side technology( what do you mean by that) My sever supports .ASP. I am making simple html pages.
plz help me. I am very thank ful.

coopster

2:42 pm on Jul 18, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Creating a file upload page is basic HTML, but what do you do with that file after it has been uploaded to the server? The answer to that question depends on which server-side technology you are using. You mentioned you are running ASP so that would seem the logical direction. The Microsoft Related - .NET and ASP [webmasterworld.com] forum may be a good start.

stef25

2:45 pm on Jul 18, 2005 (gmt 0)

10+ Year Member



if you search for "london perl mongers" you should find a page with many scripts which are easy to implement. they have a "formmail" script which includes file uploads

good luck!

Mushtaq khan

2:53 pm on Jul 18, 2005 (gmt 0)

10+ Year Member



after putting those file on my FTP server, I want them to be stored in a folder documents and then after clicking refresh button you could see link on the page to that file. Its like sharing files over then intranet. my server is microsoft, perhaps thats what you wanted to know. Can I be helped?

coopster

5:57 pm on Jul 18, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



File uploading is a common practice. The steps are basically,
  1. Create the file upload form
  2. Create the backend processing code with the server-side language of choice (ASP, PHP, Perl, etc)
  3. Move the form and processing code over to the server.