Re: Using WebObjects to upload very large files
Re: Using WebObjects to upload very large files
- Subject: Re: Using WebObjects to upload very large files
- From: David Teran <email@hidden>
- Date: Tue, 24 Feb 2004 15:13:39 +0100
Hi,
I have a web based WO project where the users will need to regularly
upload
very large files (30 to 60MB per file would be typical). What I would
really
like to achieve is for the user to be able to select the file for
uploading
from their local file system, the application then identifies the size
of
the file and whilst the file is being uploaded (direct to disk so as
not to
consume vital memory server) report back to the user is state of
completeness. In essence FTP using WO.
Use the streaming API, WOLongResponsePage does not help you in this
case directly. You have then some options to make provide status to the
user, this is how we do it:
1) upload one or multiple files with streaming api directly into a file
in the filesystem
2) you should remember the filenames and save all files from -one-
uploadform into one directory, maybe /tmp/uploads/upload_123/
3) the response from the fileupload comes -after- the files are
uploaded so you need to use javascript in order to open another window
4) this window from 3 is a WOLongResponsePage which automatically
checks and lists the files in /tmp/uploads/upload_123/ so you have at
least a progress bar or something like this although its more difficult
to get the filesize from the request.
5) when the upload is finished a page is returned as response (see 3)
and this response closes the status window with a <body
onload='closeStatusWindowJavaScript();' ..>
Thats it, nothing magick ;-)
cheers David
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.