How to enable flex security to allow local file access

372 views
Skip to first unread message

dhileepen chakravarthy

unread,
Oct 15, 2008, 8:42:03 AM10/15/08
to Flex India Community
Hi everyone,
How to enable flex security to allow local file access.
Some settings setup inside the flex is there to protect local files from server urls.
But i need to know how to enable the security flex security to allow file operations on local machine/client machine.

Thanks in advance
Dhileepen

uz

unread,
Oct 17, 2008, 4:54:20 AM10/17/08
to Flex India Community
i am having similar issue...
anyone?

On Oct 15, 5:42 pm, "dhileepen chakravarthy" <dhilee...@gmail.com>
wrote:

Venkat Viswanathan

unread,
Oct 17, 2008, 11:39:17 AM10/17/08
to flex_...@googlegroups.com
Hi,

The security sandbox in Flex wont allow you to access client's local file system. What you can do at the most is save data as Shared Objects on the local user's disk. Google for Shared Objects and you will get lot of examples.

Regards,
Venkat
www.venkatv.com

dhileepen chakravarthy

unread,
Oct 17, 2008, 11:45:54 AM10/17/08
to flex_...@googlegroups.com
Hi venkat

I done this...

Using Applet and php  to download server file  to local system.

When i put that applet inside the html and call the coressponding function it raise security issue.

Time being using iframe technique to show the applet directly .

but my client want flex screen only.
So i need anyone help.

please go through some mms.cfg its says to EnableLocalSecurity...

I want to know how to use that...

Thanks for your time,
Dhileepen

Venkat Viswanathan

unread,
Oct 17, 2008, 11:52:43 AM10/17/08
to flex_...@googlegroups.com
Hi Dhileepen,

Yes, there are workarounds. As you said, applets is one workaround. ActiveX objects are another (which works only with IE).

Long story short, you CANNOT do it directly with Flex. Flash Player will never allow you to access the user's file system. The only alternative is using AIR.

Regards,
Venkat
www.venkatv.com

Chocka

unread,
Oct 18, 2008, 10:40:51 AM10/18/08
to Flex India Community
Yes thats right. There is no direct way to access user's disk. There
are quite a few workarounds to simulate a save to local disk.

You could try uploading your contents to a server location first, and
then use FileReference.download() to download that URL to user's local
disk.

Regards,
Ravi


On Oct 17, 11:52 am, "Venkat Viswanathan" <helloven...@gmail.com>
wrote:
> Hi Dhileepen,
>
> Yes, there are workarounds. As you said, applets is one workaround. ActiveX
> objects are another (which works only with IE).
>
> Long story short, you CANNOT do it directly with Flex. Flash Player will
> never allow you to access the user's file system. The only alternative is
> using AIR.
>
> Regards,
> Venkatwww.venkatv.com
>
> On Fri, Oct 17, 2008 at 9:15 PM, dhileepen chakravarthy <dhilee...@gmail.com
>
>
>
> > wrote:
> > Hi venkat
>
> > I done this...
>
> > Using Applet and php  to download server file  to local system.
>
> > When i put that applet inside the html and call the coressponding function
> > it raise security issue.
>
> > Time being using iframe technique to show the applet directly .
>
> > but my client want flex screen only.
> > So i need anyone help.
>
> > please go through some mms.cfg its says to EnableLocalSecurity...
>
> > I want to know how to use that...
>
> > Thanks for your time,
> > Dhileepen- Hide quoted text -
>
> - Show quoted text -

subeesh a

unread,
Oct 18, 2008, 1:02:56 PM10/18/08
to flex_...@googlegroups.com
Hi,
 
New version of flash player(Flash Player 10 ) do support local file access . Why dont you give it a try
 
Here is a sample
 
 
Regards
 
Subeesh

rjoshicool

unread,
Oct 19, 2008, 6:40:15 AM10/19/08
to Flex India Community
u can access local files on flex by using "-use-network=false",
without quotes, as a command line argument if u are compiling it using
sdk. If using flex builder, right click the
application>properties>look for something called flex compiler>add the
above mentioned parameter after locale en..., Here u need to give a
space after the previous argument ends.

On Oct 18, 10:02 pm, "subeesh a" <subees...@gmail.com> wrote:
> Hi,
>
> New version of flash player(Flash Player 10 ) do support local file access .
> Why dont you give it a try
>
> Here is a sample
>
> http://dynamicflash.com/2008/07/flash-player-10-local-file-access/
>
> Regards
>
> Subeesh
>
> On Sat, Oct 18, 2008 at 8:10 PM, Chocka <chockalinga...@gmail.com> wrote:
>
> > Yes thats right. There is no direct way to access user's disk. There
> > are quite a few workarounds to simulate a save to local disk.
>
> > You could try uploading your contents to a server location first, and
> > then use FileReference.download() to download that URL to user's local
> > disk.
>
> > Regards,
> > Ravi
>
> > On Oct 17, 11:52 am, "Venkat Viswanathan" <helloven...@gmail.com>
> > wrote:
> > > Hi Dhileepen,
>
> > > Yes, there are workarounds. As you said, applets is one workaround.
> > ActiveX
> > > objects are another (which works only with IE).
>
> > > Long story short, you CANNOT do it directly with Flex. Flash Player will
> > > never allow you to access the user's file system. The only alternative is
> > > using AIR.
>
> > > Regards,
> > > Venkatwww.venkatv.com<http://venkatwww.venkatv.com/>

dhileepen chakravarthy

unread,
Oct 20, 2008, 12:37:03 AM10/20/08
to flex_...@googlegroups.com
Hi everyone,

Discussion goes in a wrong direction want i want...

Using applet i done this... it is working...
temporarily i put iframe to show the applet part directly in flex .works fine...

client doesnt want applet screen inside flex...

what i want is flex having some security to doesnt allow local files eventhough task performed via applet.

i want enable the localfile access in flex... how.... any one help me...


Note:- i can call the applet function from flex msgbox is display correctly inside the applet... applet access local files then throws exception....

TIA
Dhileepen
Reply all
Reply to author
Forward
0 new messages