This code worked correctly, and the PHP code I have to use is simple like this:
<?php $file_path = "uploads/"; $file_path = $file_path . basename( $_FILES['videoFile']['name']); if(move_uploaded_file($_FILES['videoFile']['tmp_name'], $file_path)) { echo "success"; } else{ echo "upload_fail_php_file"; } ?>
NOTE that videoFile must exactly match
reqEntity.addPart("videoFile", filebodyVideo);
And the MOST problem. Important , which you are likely to encounter, is the default value of post_max_size and upload_max_filesize in the server configuration! The default is too small, and when you try to upload large files, the PHP script returns: "upload_fail_php_file" without any errors or exceptions. Therefore, remember to set these values as large enough ...
Enjoy the coding.
Ali Bagheri Shakib May 6 '14 at 9:47 a.m. 2014-05-06 21:47
source share