我正在使用Adobe Flex为Playbook开发应用程序。我需要将照片和视频从playbook上传到IIS服务器。我正在使用file.upload(url)
上传两个媒体。这是我的代码。
private function uploadingProcess(fileName:String):void
{
var file:File = File.applicationStorageDirectory;
file = file.resolvePath("data/"+fileName);
var uploadServerAddress:String = serverAddress;
urlRequest = new URLRequest(uploadServerAddress);
urlRequest.method = URLRequestMethod.POST;
file.addEventListener(Event.COMPLETE, uploadCompleteHandler);
file.addEventListener(SecurityErrorEvent.SECURITY_ERROR, uploadSecurityError);
file.addEventListener(HTTPStatusEvent.HTTP_STATUS, uploadError);
file.addEventListener(IOErrorEvent.IO_ERROR, uploadError);
file.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, serverResponse);
try{
file.upload(urlRequest);
} catch(error:Error){
trace("Uploading error " +error.toString());
}
}
当我尝试上传视频(mp4)文件时,我收到以下错误消息。
[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2038: File I/O Error. URL: http://www.sample.com" errorID=2038]
图片和视频都位于同一位置。
任何人都可以让我知道为什么我只在视频上传时收到此错误? 感谢