-
1. Re: FileReference.load without selecting a file
Joe ... Ward Aug 17, 2011 11:29 AM (in response to Damon Edwards)File inherits from FileReference. Just use File.load(). (Although I've always loaded files using FileStream.)
-
2. Re: FileReference.load without selecting a file
Damon Edwards Aug 17, 2011 1:16 PM (in response to Joe ... Ward)Thanks Joe, so what I'm looking to do is upload a file on the filesystem
without having to select it via browse(). I'm assuming I'll have no
problems calling File.upload() then?
-
3. Re: FileReference.load without selecting a file
Joe ... Ward Aug 17, 2011 1:21 PM (in response to Damon Edwards)Correct. You shouldn't have any trouble.
-
4. Re: FileReference.load without selecting a file
Damon Edwards Aug 17, 2011 1:35 PM (in response to Joe ... Ward)aahh i found my problem. i tried all of this earlier but it wasn't working.
i was instantiating MediaPromise, but didn't notice the error until
debugging on the device thanks Joe!
-
5. Re: FileReference.load without selecting a file
Damon Edwards Aug 17, 2011 1:47 PM (in response to Joe ... Ward)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..
-
6. Re: FileReference.load without selecting a file
Joe ... Ward Aug 17, 2011 3:07 PM (in response to Damon Edwards)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.
http://www.adobe.com/devnet/air/articles/uploading-images-media-promise.html
-
7. Re: FileReference.load without selecting a file
Damon Edwards Aug 17, 2011 3:41 PM (in response to Joe ... Ward)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!
-
8. Re: FileReference.load without selecting a file
Damon Edwards Aug 17, 2011 4:04 PM (in response to Joe ... Ward)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
Damon Edwards
760.317.6315
-
9. Re: FileReference.load without selecting a file
Damon Edwards Aug 17, 2011 4:54 PM (in response to Joe ... Ward)Did another test and it worked again, but this time I captured the error.
"Error #2038: File I/O Error. URL:
"
This was a 27 second recording, and again posted just fine:



