The Wayback Machine - https://web.archive.org/web/20090401232915/http://bugs.adobe.com:80/jira/browse/SDK-14245
  History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-14245
Type: Feature Request Feature Request
Status: Closed Closed
Priority: None None
Assignee: Matt Chotin
Reporter: Cato Paus Skrede
Votes: 65
Watchers: 18
Operations

If you were logged in you would be able to see more operations.
Flex SDK

[external] flash.net.FileReference API

Created: 01/08/08 12:54 PM   Updated: 07/16/08 07:45 PM
Component/s: None
Security Level: Public (All JIRA Users )


 Description  « Hide
flash.net.FileReference API we have currently in the Flash Player 9.

One of the most disappointing thing we have when playing with bytes in the Flash Player 9 is the FileReference API. Let's say you call the FileReference.browse() method to select a file.

Once selected, you have no way to get a ByteArray from it directly.

we would like to get the bytes from a selected file with the OpenFileDialog, and also include a SaveFileDialog. This should allow us to save runtime streams locally through a save-as dialog window.

Why not do the same security model on the fileAPI, that Adobe did with the Flash Player cache:

article rip from Ted on flex.
http://www.onflex.org/ted/2007/06/flex-3-thursday-dramatically-smaller.php
{
Security and Code Signing:
Caching of RSL assets across domains opens many security issues if anyone can cache code in Flash Player. To eliminate this risk code signing was added in Flash Player and assets using this feature must be signed by Adobe. Without this tight security model this feature could never have been added to Flash Player. The upside is that with Flex 3 going Open Source, developers can get new features and components added into the Flex Framework which supports this feature.
}



 All   Comments      Sort Order:
Luciano Bustos - [01/09/08 07:28 PM ]
Come on guys!!.
MS-Silverlight has this rock'ing feature.
Why not flash player ?

Samuel Neff - [01/10/08 07:24 AM ]
I know the reason we can't is due to security and the sandbox, but as long as the user is choosing the file, then there isn't really a security issue. Silverlight lets developers do a lot more than Flash with respect to security and the local system, so at this point security is becoming a competitive disadvantage (full screen on web with interactivity is another example).

Tom Chiverton - [01/18/08 04:53 AM ]
Having better security will only be seen as a disadvantage until the first really nasty Silverlight exploit (ala ActiveX).

Pleh - [01/28/08 03:48 AM ]
Giving developers permission to get a ByteArray from a file selected by the user will in no way effect the security already in place as this is already possible by uploading the selected file to the server and then reading the ByteArray from there. The same goes for saving files created in flash, they are all currently saved by uploading them to the server, then downloading them to the client. This causes huge amounts of unnecessary bandwidth waste and is a ridiculous position for Adobe to currently be in, adding this feature is a must!

Matt Chotin - [02/11/08 05:41 PM ]
Not closing yet because we need to track, but this is a Player issue and not SDK. That said, Player team already has the FR.

Robert Stehwien - [03/06/08 06:38 AM ]
While not part of the SDK, I voted because I couldn't find a player bugbase to vote on. I'd love this feature so I don't have to go through the convoluted steps of uploading to a webservice using a GUID and then downloading the file from the webservice just to get the bytes or show a preview of the image someone may want to upload. Then I have to cleanup the webservice should the user change their mind about uploading or I really didn't need to upload in the first place since it was only temporarily used in Flex.

javanai - [04/19/08 04:43 AM ]
Can't find the player bugbase either so hopefully this info will be passed on.
It really shouldn't be a security issue considering once the user selects the file you can upload to your server right away anyway. What's the diffrence with that and having instant access without requiring the upload ? I don't see how we could abuse the ByteArray If we were allowed to treat it immediately. You would be in exactly the same situation as if you had used a Loader. Am I wrong or have I missed something ? Anyway hope this situation is resolve for the flash player.

Erik Westra - [05/17/08 04:50 PM ]
This enhancement seems to have been added in Flash player 10

Cato Paus Skrede - [05/18/08 02:47 PM ]
Rock'n Roll :)

Matt Chotin - [07/16/08 07:45 PM ]
This is a feature of Flash Player 10, no need for Flex involvement.