Little sister ask jquery ajaxfileupload file upload problem!
I wrote an example of a jquery ajaxfileupload!
Everyone brother Siang help me see what is wrong! Why not print file size! Total print [Object Error]
Jquery_upload.html
<title>JQuery Upload Ajax Learning</title>
jquery_validate.php
$fileElementName = ' picfile ';
echo $_files[$fileElementName [' size '];
?>
------Solution--------------------
PHP Code
------Solution--------------------
Ajax is not able to upload files, so your onchange= "ajaxfileupload ()" is not responsive
If you're going to use Ajax, you can only commit after you get through Ajax
Submit button
By the way, I'll answer your question about a comrade.
Startprogress (); The results are obtained by setting a timed send query.
PHP production Real-time upload progress is to use this method, interested in understanding the words to see
http://www.ibm.com/developerworks/cn/opensource/os-php-v525/
What's new in PHP V5.2, part 5th: Track File Upload Progress
If you want to get the file size on the client you can use
HTML Code
------Solution--------------------
To Luojxun:
Ajax is not able to upload files.
However, Ajaxfileupload completed the process of simulating an IFRAME form submission, so you can upload the file.
In addition, which link you give, but also the use of the form under the IFRAME submission completed upload, but the use of php5.2 new features only.
to landlord:
I need to explain that, when the call Ajaxfileupload () function, in fact, the file has been uploaded to the server, although you did not receive, if you click Submit, it belongs to two commits, hehe. Of course, this can be done as well.
To help you modify, in fact ajaxfileupload need to return JSON format.
PHP Code