views:

387

answers:

5

Hey.

I am trying to upload a lot of files from a browser to a webserver that I have total control of. I've tried to use SWFUpload, but the problem is that my browser hangs when I am uploading a file. The files are supposed to be of any length (up to 2GB due to other restrictions, of course).

While the upload is in progress the browser hangs and the GUI is not updated. When the file is finally uploaded the GUI responds again. In firefox the entire browser stalls and in Chrome just the tab.

I thought it might have something to do with flash trying to inject the entire file in to the memory first, but that does not seem to be the case (although different test cases yielded different results, but I'm not sure that it's because of that reason).

An applet is also an option, although flash is preferred. The reason I don't want to use a form is because you can select multiple in flash (also possible with Java, I assume) which is a nice feature that I'm going for.

Any ideas? Thought?

(math|tob)ias

A: 

Try an AJAX one: http://sourceforge.net/projects/uber-uploader/

Lighter on the resources and more platform-independent.

danuker
A: 

Check SWFUpload swfupload.org

and there is a descussion about this point: http://swfupload.org/forum/generaldiscussion/173

Mohamed
+1  A: 

If you're using linux, this is a known problem. For Windows users this doesn't happen. Otherwise, you'll have to stick to ajax (the best way is with the jQuery forms plugin). http://www.plupload.com/, this one looks interesting, but I haven't looked into it. You may want to give it a try.

blockhead
A: 

client-side I like this jquery plugin:

http://valums.com/ajax-upload/

if you need examples of server-side handling:

http://php.net/manual/en/features.file-upload.php

jellyfishtree
A: 

I've use this for my projects... http://jupload.sourceforge.net/ I found I had better results though when I used it in FTP mode. I had issues with http uploads. It does support multiple files which is nice. You can upload the files into an "incoming directory" and then process them later when the transfer is finished.

Boolean
You might also consider [JCustomUploader](http://dound.com/projects/JCustomUploader) - it supports HTTP uploads (POST or multipart/form-data) or you can define your own upload mechanism. Its UI supports choosing files, drag and drop, parallel uploads, and only needs Java 1.4+.
David Underhill