Ultrashock Forums > Flash > ActionScript
AS3 - Resume Upload - possible?

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
AS3 - Resume Upload - possible?
Old 2008-06-20

So you've got somebody uploading a bunch of huge files (FileReferenceList) in your Flash or Flex app (NOT AIR).

Something happens - they lose power, connectivity, they accidentally log off etc.

They log in again, get reconnected etc. ...

Is it possible to:

a) automatically locate those orphaned uploads w/out them having to browse and select them again (basically, storing the FileReferenceList - in an FSO maybe?) so you can automatically start uploading them again?

b) find out where the upload of each file got cut off and resume the upload from there (instead of having to upload the whole bloody thing from scratch)

Thanks!
Brandon E.B. Ward
UX & UI Designer, Flex & Flash Developer
http://www.uxd.me
postbit arrow 4 comments | 1288 views postbit arrow Reply: with Quote   
Registered User
wraevn is offline
seperator
Posts: 434
2003-11-14
Age: 33
wraevn lives in United States
wraevn's Avatar
seperator

Ultrashock Member Comments:
Nutrox's Avatar Nutrox Nutrox is offline Super Moderator Nutrox lives in United Kingdom 17 Creative Assets 2008-06-20 #2 Old  
Resuming the file upload from where it was cut off isn't possible because you can't access the file system directly from the Flash Player. It is possible with AIR though as long as you keep track of where the data is being stored on the server... but I guess that isn't of much use to you for this.

The first question is an interesting one though. I don't think that will be possible either unless a FileReferenceList object can be serialised properly. I can try a few things out for you later today if it will help.
Reply With Quote  
wraevn's Avatar wraevn wraevn is offline wraevn lives in United States 2008-06-20 #3 Old  
If serializing a FileReference is what's necessary - would this work?

http://www.mikechambers.com/blog/200...-in-adobe-air/

I hesitated delving too deep w/ this as it's in reference to an AIR project, but perhaps ... ?
Reply With Quote  
Nutrox's Avatar Nutrox Nutrox is offline Super Moderator Nutrox lives in United Kingdom 17 Creative Assets 2008-06-20 #4 Old  
The File class is a bit different to FileReference because the FileReference's name property is read-only which means you wouldn't be able to restore the name/path of the file again when the object was restored. I don't think the full system path to the file is public either. If the filename/path is stored as a private variable within the FileReference class then this isn't going to be possible unfortunately. So, getting a FileReference object to serialise properly is possible but restoring the filename/path when the object is restored probably isn't, and that puts a big spanner in the works.
Reply With Quote  
wraevn's Avatar wraevn wraevn is offline wraevn lives in United States 2008-06-24 #5 Old  
blech - that's no fun ... I wonder if it's possible to write your own FileReference ... Thanks Nutrox for your input!
Reply With Quote  
Thread Tools
Display Modes Rate This Thread
Rate This Thread: