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?
|All times are GMT +1. The time now is 07:34 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.