In the docs there's this sentence:
"For content running in Flash Player, you must call the
FileReferenceList.browse() method before you call the
load() method. However, content running in AIR in the application sandbox can call the
load() method of a File object without first calling the
Underline is mine - this makes me assume I can somehow load a file into a filereference without waiting for the SELECT event.. But, I'm not seeing how to do it? I know where the file is on the system and can load it up via new File('/my/path/file.ext') but I don't see how to pass that off to a filereference. Any help is much appreciated!
hey Joe, so I got the whole process working and it's really cool. one odd
thing is that i get an IOError for the upload, yet it does actually
succeed.. here's the video shot on the tablet and uploaded
http://www.youtube.com/watch?v=wfcWxKlleDk but i got an IOErrorEvent
returned on the File object..
The video is too blurry for me to read.
If you want to put your app on iOS, be aware that the media promise doesn't give you a File object to work with. You have to read the media data into a byte array and either upload that directly (or create a temporary file). I just wrote an article on the topic. I only tested with still pictures, but the same considerations should hold for video.
The video was only demonstrating that the upload actually completed just
fine, sorry for the confusion on that. So, as you can see the upload works
because the video is on YouTube - the problem is rather than getting the
COMPLETE event I got an IOErrorEvent which is strange since the upload
succeeded. See what I'm saying?
No plans for this on iOS, but thanks for the info!
The video u see was taken from the tablet by my app so it's already working just great. Only problem is rather than a COMPLETE event I get an IOErrorEvent - even though the file obviously uploaded fine - as shown by the YouTube videos existence. See what I'm saying?
Sent from my iPhone
Did another test and it worked again, but this time I captured the error.
"Error #2038: File I/O Error. URL:
http://uploads.gdata.youtube.com/action/FormDataUpload/AIwbFAQ88mh1D8o fSt8u5C6O3yZ0Xcg7P0tMq5M3k3y46rHaeRo6_fi91oNIGxEyZMygCttfWcQUVkkdvs7E7 X679HuPb1PCKw?nexturl=http%3A%2F%2Fwww.desktube.tv%2Fupload-complete
This was a 27 second recording, and again posted just fine: