This content has been marked as final. Show 4 replies
I am using the following code:
private var fileRefDownload:FileReference;
private function downloadFile():void
fileRefDownload = new FileReference();
var urlRequest:URLRequest = new URLRequest(FILE_DOWNLOADLOAD_URL);
//FILE_DOWNLOAD_URL is the URL of the servlet to download
var uv:URLVariables = new URLVariables();
urlRequest.data = uv;
urlRequest.method = "POST";
uv.ID = 1;
I tried the following events to retrieve the filename of the file being downloaded.
DataEvent.DATA, Event.ACTIVATE, Event.CONNECT, Event.INIT, Event.OPEN
I get the servlet name as the filename. Even the API document says the same. What Event should I register, so that, I can get the filename of the file being downloaded?
I believe you need to pass a second parameter to the download() method which will be used as the default file name in the save/download file dialog box.
But, I dont want the default name to be displayed. I want to display the actual name of the file.
Thanks for the help.