Let’s say you want to upload a file to your server with your AIR program (using File.upload
). On the server side you have a php script to handle the file uploading. A very common mistake is that the name of the file field in your AIR (by default, it is “Filedata’) is different from that in your php script. Your php script should be something like this:
if(move_uploaded_file($_FILES['Filedata']['tmp_name'], $foldername)) { print "success"; } else { print "fail"; }
Of course, you can always specify your own file field name in File.upload (2nd parameter)
File.upload(request:URLRequest, uploadDataFieldName:String = "Filedata", testUpload:Boolean = false):void
Receive email notification via email 博客有新内容通知我
Don't want to miss new papers in your field? Check out Stork we developed: ![]() |
专注医学生物类的论文润色 联系他们请用优惠码 STORK4,他们会给你折扣。 |