4 Replies Latest reply on Apr 11, 2007 11:14 PM by Flex_Coder111

    GETTING ABSOLUTE FILE PATH IN FLEX

    Flex_Coder111
      Hi,

      I am Facing 2 issues in Flex..
      1) I am not able to import flash.fileSystem in my MXML Application

      2) Is it possible to get path of file using fileReference. I want the path of the selected file

      Can someone please help !!!


        • 1. Re: GETTING ABSOLUTE FILE PATH IN FLEX
          peterent Level 2
          You cannot get the path to a file; it is considered a high security threat. You can imagine that someone could write a malicious SWF which prompts for a file and then, having the full-path to the file, proceeds to erase it, mangle, it, etc.

          If you need to work with local files using Flash technology, check out Adobe Apollo on the Adobe Labs site.
          • 2. Re: GETTING ABSOLUTE FILE PATH IN FLEX
            Flex_Coder111 Level 1
            okay, Thanks... But is there a work around using which I can open a particular file. The thing is that I want to store images in Base64 format.

            reg,
            Yash
            • 3. Re: GETTING ABSOLUTE FILE PATH IN FLEX
              peterent Level 2
              There is no way the Flash Player will open a local file for you. Keep in mind that the Flash Player was designed and developed for web application - those apps which are served remotely with the intention of keeping the data on a server. If you wanted to upload your image onto a server, that's fine.

              If you want to store files locally, please look into Adobe Apollo. You'll still get to use Flex and Flex Builder. The result will be a desktop application with an easy-to-use, operating system independent, way to read and write local files.
              • 4. Re: GETTING ABSOLUTE FILE PATH IN FLEX
                Flex_Coder111 Level 1
                okay Thanks. then I let Flex upload the file as it is without conversion. I took a look at Apollo.. it is amazing !!! but will not serve the purpose for me this time. but, its on my mind...

                reg,
                Yash