Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
07-11-2011, 06:48 PM #1
- Join Date
- Jul 2010
- Thanked 0 Times in 0 Posts
How to access HTTP status code for FileReference download
I am using Flex 4, ActionScript 3.
My frontend client needs to call a URL that will do the following:
1. Produce a zip file containing grammar files that are previously generated.
2. Create an entry in this zip file for a prompts list file.
3. Stream this zip file to the client.
Also, ff the grammar files have not been previously generated, the middleware sends back a 404 HTTP status code.
I've used the FileReference upload method before. For the upload, I can explicitly call the FileReference browse method to bring up the operating system's "Select file to upload" dialog box. The upload also dispatches two very useful events: httpStatus and httpResponseStatus.
Now for my current task of doing the download, I've noticed two differences from the upload:
1. The browse method is incorporated into the download method to automatically bring up the operating system's "Select location for download" dialog box.
2. The httpStatus and httpResponseStatus events do not exist for download.
Why are there these differences for the download?
I briefly looked at the URLLoader class. This class does dispatch the httpStatus and httpResponseStatus events. However, there is no explicit or implicit browse method.
Can you please let me know what I can do to fulfill all of my requirements for this task?