« Phase of life | Main | Yaarana: a music video by IIT Kanpur students »

May 10, 2006

FileReference updated in Macromedia Flash Player 9 beta 3

flash.net.FileReference class, in latest beta of Macromedia Flash Player 9, has been updated. Let's see the FileReference.upload(..) method signature.

public function upload(request:URLRequest, 
uploadDataFieldName:String = "Filedata", testUpload:Boolean = false):void

Following are things, I noticed in the latest beta.

This means, I can now go ahead and complete my Flickr AS3 API. I was stuck, when I wanted to upload pictures to Flickr. Darron's Flickr AS3 library was also missing file-upload feature because of above mentioned limitation in previous versions of Flash Player 9 beta. I am sure, Darron must have updated Flickr AS3 library.

Posted by Abdul Qabiz at May 10, 2006 11:56 AM

Comments

Hi Abdul,
I am trying to use the FileReference Class to load images into my flex application directly at runtime....however i cannot trace the complete location of the file i select from the browse method.....can u help??
send me some link or anything!,
Rama.
Thanks in advance

Posted by: Rama at June 7, 2006 08:57 PM

hi, can you tell me how to upload an image on the swf file in Flex(Flex 2 beta 3) using FileReference and send it across to the coldfusion and store it in some file system....thank you

Posted by: Rajesh Bhadra at June 8, 2006 10:15 PM

Hi Rama,

Due to security sandbox, you can not get the complete path of local-file. You would only get the filename. I understand, it's frustrating but at the same time secuirty is also important.

You have to do roundtrip (upload to server then download from server) to make it work..

-abdul

Posted by: Abdul Qabiz at June 10, 2006 02:13 AM

Hi Rajesh,

You can look at Flex 2.0 live docs, there are many examples.

http://livedocs.macromedia.com/labs/1/flex/langref/flash/net/FileReferenceList.html

If you still have problem, let me know.

For coldfusion, I think, following code should work.

<cfset destinationPath = "uploads\"/>
<cffile action="upload" fileField="Filedata" destination="#destinationPath#" nameConflict="makeUnique" />

Posted by: Abdul Qabiz at June 10, 2006 02:41 AM

Hi Abdul.

Can you upload photos to flickr?
I try to update the code of Darron's Flickr Api, but I can't sent photos...
Can you send me your modifications of Photos.upload? Only if you worked on it, of course.
Thanks!!

Posted by: Gustavo Sanabio at July 21, 2006 05:49 AM

the latest beta's features are really cool, it's more advanced than the previous version, especially "You can now send HTTP/POST parameters with file-upload request"

Posted by: Kurt Granroth at September 6, 2006 08:42 AM

Hello,

Im searching for code to loging in to flickr and upload pictures with flash as.

Can someone tell me if there is an example script to find somewhere, I know the basics of actionscript,Im not advanced yet.

Hope that you can help,greetings,Ber.

Posted by: Ber van Geer at September 25, 2007 03:45 PM

hi adbul,
i m trying to use richtexteditor in coldfusion mxml files. But I am not able to do it. can you please helkp me with this

Posted by: sandhya at February 29, 2008 02:03 AM

Post a comment




Remember Me?


Please enter the security code you see here

(you may use HTML tags for style)