I have some mxml
which is supposed to DL a file on a mouse click
Everything seems to work - path is correct as shown by alert, file exists in path, save dialog opens with correct file name (renamed by data.recipetitle + '.pdf') except when save dialog closes, no file is downloaded. I have seen that this can be due to
1) sandbox security - flex app is in www.server.com/flex
and files to dl are in 'www.server.com/media/recipes/'
so shouldn't be an issue
2) Instantiating the filereference var within the function - not doing that.
static private var fileToDownload:FileReferen
ce = new FileReference();
private function download(event:MouseEvent)
var request : URLRequest = new URLRequest();
request.url = 'http://www.server.com/media/recipes/'
+ data.recipeid + '.pdf';
request.method = URLRequestMethod.GET;
quest, data.recipetitle + '.pdf');
Alert.show("Unable to download file.");
No errors - just a silent fail.