How can I save image with PHP which was uploaded with http post using FLASH?
To upload to i’m PHP using this:
var upload_to:*=new flash.net.URLRequest("url");
fileHandler.upload(upload_to);
And when I print $_FILES in PHP I get:
{"Filedata":{"name":"IMG_8658 copy44.jpg","type":"application\/octet- stream","tmp_name":"C:\\WINDOWS\\Temp\\php35.tmp","error":0,"size":183174}}
so the question is, how to form a file from that $_FILES variable?: ) Thanks
PHP doesn’t store the file in memory. It’s written out to a temporary file, which you can retrieve the name/path of from the
tmp_namevalue (C:\WINDOWS…). Thenamefield is the filename as provided by the client (IMG_8658…);In your case, that’d be