receive image with PHP sent from FLASH -



receive image with PHP sent from FLASH -

how can save image php uploaded http post using flash?

to upload i'm php using this:

var upload_to:*=new flash.net.urlrequest("url"); filehandler.upload(upload_to);

and when print $_files in php get:

{"filedata":{"name":"img_8​658 copy44.jpg","type":"applic​ation\/octet- stream","tmp_​name":"c:\\windows\\temp\\​php35.tmp","error":0,"size​":183174}}

so question is, how form file $_files variable?: ) thanks

php doesn't store file in memory. it's written out temporary file, can retrieve name/path of tmp_name value (c:\windows...). name field filename provided client (img_8658...);

in case, that'd be

$_files['filedata']['tmp_name'] <-- location of temporary file $_files['filedata']['name'] <---original filename $_files['filedata']['size'] <--- size in bytes $_files['filedata']['type'] <-- mime type, provided uploader $_files['filedata']['error'] <--- error code of upload operation (0 = a-ok)

php flash

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -