flash上传跨域,一般是加入crossdomain.xml
我用了别人的图片服务器,只能做此下策:
//CURLFile 实现
$file = $_FILES['Filedata']['tmp_name'];
// get mime type
$finfo = new finfo(FILEINFO_MIME_TYPE);
$mimetype = $finfo->file($file);
// Create a CURLFile object
$cfile = curl_file_create($file, $mimetype, $_FILES['Filedata']['name']);
$f['file'] = $cfile;
$res = curl_post($uploadapi, $f, array(), 5);