2 Replies Latest reply on Aug 10, 2008 8:11 PM by Oliver Goldman

    Uploading files without browse

      Hi, I'm writing an AIR app that needs to automatically upload an XML file (which I know the name of) to my server. Can I do it without browsing? Needs to be automatic (without user finding or selecting file) because my client doesn't want to manage that. Also, I'm developing it in Flash, not Flex.
        • 1. Re: Uploading files without browse
          This is javascript, but it should translate directly to flash:

          var file = air.File.applicationDirectory.resolvePath( "file.xml" );

          then just upload that file. make sure when you create the file, use the "applicationDirectory" as the reference dir.
          • 2. Uploading files without browse
            Oliver Goldman Adobe Employee
            Mjr81 is correct that you can do this via the File API, and that it's accessible from Flash. However, there is no need to use the applicationDirectory. Uploading will work with any readable file, regardless of its location. (Since files in the applicationDirectory are not writable, it's all of those other files that are usually more interesting to upload.)