New File Transfer Library

tliebeck's picture

A new Echo3 File Transfer Library has been under development during the past several months. As often requested, the upload components now provide notification of uploads from within user interface threads, avoiding unpleasant work for the developer. A new MultipleUploadSelect component is also available which wraps the Flash-based SWFUpload multiple file upload component. The MultipleUploadSelect component can be safely used in situations where Flash installation is not a certainty in the intended deployment environment, as the component will fall back to the traditional browser-based upload when Flash is not available. Other new features include the ability to limit global file upload bandwidth for a server, and to programmatically cancel in-progress uploads.

The new library is intended for use with both client-side and server-side applications, with both UploadSelect and MultipleUploadSelect being supported in either environment. A receiver servlet is provided for client-side configurations, if desired. Developers can of course create their own such receiver (e.g., if they are not using Java on the server).

The new FileTransfer code has been moved from the exp branch to the trunk. It will now be part of the nightly builds for Echo3 ("Echo3Go"). These can be obtained from: http://download.nextapp.com/downloads/echo3go/

The new library is still very much under development, but should nevertheless be a significant improvement over the previous iteration. Bug reports, feature suggestions, and code/API review are greatly appreciated.

Great work, Tod! When you

Great work, Tod!

When you say notifications, does it mean we can integrate this with a progress bar other than the one provided with SWFUpload? or maybe simply display a label with the percentage of upload?

I'm not familiar with SWFUpload: does it notify the server with content size before starting upload? I'd like to reject the upload altogether if the size limit is exceeded, before the actual upload starts.

tliebeck's picture

Both upload components have

Both upload components have the same API for configuring a ProgressBar. I'm not sure if they're configurable from the server yet, but if not, you will be able to do so in the future.

jadeblade's picture

Specification for MultipleUploadSelect

The MultipleUploadSelect is just what some of my clients have been asking for.

I apologize if the documentation for the MultipleUploadSelect is readily available, and I'm simply not seeing it, but (without intending to sound redundant) I'm simply not seeing it. Is there a link somewhere?

J

tliebeck's picture

Sorry, I still need to

Sorry, I still need to upload the API spec to this site. For the moment you can get it from the nightly builds:

http://download.nextapp.com/downloads/echo3go/

at the location:

NextApp_Echo3_FileTransfer/Documentation/api/public/index.html

jadeblade's picture

MultipleUploadSelect

Thanks, Tod (is it just one D in Tod?) for helping me find the documentation. It has been helpful.

I've been making progress, but I have a couple of questions.

When I click the "Upload" button, it allows me to select a file to upload, and upon selecting the file, it fires the uploadStart event. However this appears to be as far as it gets. On calling upload.getProgress() at any point after this, it always returns zero, as does upload.getStatus().

It seems that I am missing something. Do I need an additional, non-ui thread that monitors/pushes the upload, or is there a method to call to get it moving?

Second, how do I access the "Multiple" part of MultipleUploadSelect. I'm probably missing something here too, because I have only seen the ability to get one file at a time.

Finally, how can I control the look-and-feel of the "Upload" button and the progress bar? Is there a model behind the scenes or something else?

Sorry for the plethora of questions. I seem to be the only user on this thread... Maybe everyone else figured it all out on their own.

Thanks for all the help,

J

jadeblade's picture

Anybody else try MultipleUploadSelect

Has anybody else tried the MultipleUploadSelect? How is it going for you?

J

tliebeck's picture

There's a test app that's

There's a test app that's part of the distribution, if you need an example.

I don't have a client-side example nicely put together just yet for either component.

jadeblade's picture

servlet name

It's in with the extras download or filetransfer? What was the servlet name for that?

J

jadeblade's picture

Servlet Name = "FileTransferTest"

Figured out the servlet name. It appears to be "FileTransferTest".

But there seems to be a problem with the MultipleUploadSelect... Even in the test app it doesn't get past starting. Is this just on my computer or has anyone been successful getting it to work?

J

I installed the test

I installed the test FileUploadTest application, but I don't think the multiple upload component is working properly. The attached screenshot shows what I get (tested in FF and IE).
I can click the "Upload" button (?), a system file selection dialog opens up and a file is uploaded when chosen. I don't see any possibility to upload several files at once.

AD

It works

For those searching the forum:
The MultipleUploadSelect works (tested in FF): You can select multiple files in the selection dialog. All UploadListener are called once for each file.
Bjoern