bcollins
bcollins

Reputation: 3459

File download from browser in Flex?

The FileReference class in Flex downloads just fine, but does not do so through the browser.

The browser download window (e.g. firefox green down arrow) does not show the download has occurred. Is there a way to download from a server url which will include the download in the downloads window?

    private function downloadFile(dataFile:DataFile):void
    {
        var downloadURL:URLRequest = new URLRequest(dataFile.url);
        var file:FileReference = new FileReference();
        file.download(downloadURL, "output_file.zip");
    }

Upvotes: 0

Views: 587

Answers (2)

James Shaji
James Shaji

Reputation: 316

Try using absolute path to download file, could be issue with file path. If you have debugger version of flash player then there should be a popup with error info.

Upvotes: 0

Related Questions