Saving Files to the Server.

liunx

Guest
I was wondering how i could have a user save files to my server.<br />
<br />
I want the to be able to store a file from thier computer, onto the server.<br />
<br />
Also, how would i check to see whast the file size that they are saving is so that i can set limits on how large the files they save are.<br />
<br />
Can anyone help me?<br />
<br />
Thanks.<!--content-->If you have server-side processing available then you can have your user do a form-based upload (using the input type="file" widget). You cannot, however, know the size of the file until it is on the server.<!--content-->Thanks.<br />
<br />
How would i go about writing the code for the server-side processing?<!--content-->I'd use the Perl CGI.pm module to handle it if Perl is available. Someone else here could probably say how PHP would do it. Your process on the server has to handle a multipart/form-data type request.<!--content-->Do you know of any good code examples that would help me?<!--content-->http://quasi-ke.servebeer.com/sampleaps/upload.aspx<br />
that is a sample upload form made with asp.net (It is disabled, its saving to the x (not real) drive because that server runs off my home machine and I do not want people putting files on it)<br />
The source code is<br />
<!-- m --><a class="postlink" href="http://quasi-ke.servebeer.com/sampleaps/upload.txt">http://quasi-ke.servebeer.com/sampleaps/upload.txt</a><!-- m --><br />
To use this you will need to be on a windows server (iis) with the .net framework installed, or a linux server (apache) with the mono project installed.<br />
<br />
Using asp.net and other server side technologies you can allow users to upload images, resize them to make thumbnails and save them in a dir or add them to a db and other thigns to make real world applications such as image galleries.<!--content-->The CGI.pm module docs have an example. It's very simple to use.<!--content-->you could set up the filezilla ftp server<br />
<!-- m --><a class="postlink" href="http://filezilla.sourceforge.net/">http://filezilla.sourceforge.net/</a><!-- m --><!--content-->
 
Back
Top