Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browser, upload large file

I'm looking for a way to allow a user to upload a large file (~1gb) to my unix server using a web page and browser.

There are a lot of examples that illustrate how to do this with a traditional post request, however this doesn't seem like a good idea when the file is this large.

I'm looking for recommendations on the best approach.

Bonus points if the method includes a way of providing progress information to the user.

For now security is not a major concern, as most users who will be using the service can be trusted. We can also assume that the connection between client and host will not be interrupted (or if it is they have to start over).

We can also assume the user is running a browser of supporting most modern features (JavaScript, Flash, etc)

edit

No language requirements. Just looking for the best solution.

like image 680
Mike Avatar asked Jun 02 '10 00:06

Mike


1 Answers

There are several ways to handle this,

1. Flash Uploader

Theres plenty of flash uploaders to improve the users GUI so that they can examine the process and the process factors such as time left, KB Done etc.

This is very good if you understand how to improve Flash source code for later developments.

2. Ajax

Theres a few ways using Ajax and PHP (although PHP Does not support it) you can use Perl module to accomplish the same thing http://pecl.php.net/package/uploadprogress, This is only if you wish to show percentage information etc.

3 Basic Javascript.

This method would be just the regular form, but with some ajax styling so when the form is submitted you can show a basic loader saying please wait while you send us the file...

If your using asp, you can take a look at: http://neatupload.codeplex.com/

Hope theres some good information to get you on your way.

Regards

like image 128
RobertPitt Avatar answered Sep 29 '22 23:09

RobertPitt