//上传图片+变量
private function uploadFile(url : String) : void {
var ext:String="jpg";
var request : URLRequest = new URLRequest(url+"?ext="+ext);
request.contentType = "application/octet-stream";
request.method = URLRequestMethod.POST;
request.data = jpgStream;
uploader.dataFormat = URLLoaderDataFormat.BINARY;
uploader.addEventListener(Event.COMPLETE, upload_complete);
try {
uploader.load(request);
} catch (error : ArgumentError) {
trace("An ArgumentError has occurred.");
} catch (error : SecurityError) {
trace("A SecurityError has occurred.");
}
}
private function uploadFile(url : String) : void {
var ext:String="jpg";
var request : URLRequest = new URLRequest(url+"?ext="+ext);
request.contentType = "application/octet-stream";
request.method = URLRequestMethod.POST;
request.data = jpgStream;
uploader.dataFormat = URLLoaderDataFormat.BINARY;
uploader.addEventListener(Event.COMPLETE, upload_complete);
try {
uploader.load(request);
} catch (error : ArgumentError) {
trace("An ArgumentError has occurred.");
} catch (error : SecurityError) {
trace("A SecurityError has occurred.");
}
}
回复Comments
作者:
{commentrecontent}