I use fileReference.download() to download files. The fileReference send request to java servlet.In servlet, some error may be checked. For example error - 'File not found'. I want to send the error to flex side. I tried lots of methods,but fileReference in flex can't receive them. Such as
response.sendError(HttpServletResponse.SC_NOT_FOUND, "File not found");
or
PrintWriter out = resp.getWriter(); out.print("File not found");
It seems fileReference can't triggers event 'DataEvent.UPLOAD_COMPLETE_DATA' and 'HTTPStatusEvent.HTTP_STATUS'. Can somebody tell me how to get servlet error message in fileReference. Thanks