- Home /
unity crash when upload a file
Hi...
I created an application to upload files to my server .
on android when I upload a file more than 13 mb . the unity crash and close .
but when I use the same application on Editor , it's work fine ..
what should I do ?
upload code :
WWWForm postForm = new WWWForm();
postForm.AddBinaryData("theFile",localFile.bytes,FilePath,"");
upload = new WWW(UploadPHP,postForm);
yield return upload;
php file
$folder = "../Uploaded/";
if (is_uploaded_file($HTTP_POST_FILES['theFile']['tmp_name']))
{
if (move_uploaded_file($HTTP_POST_FILES['theFile']['tmp_name'], $folder.$HTTP_POST_FILES['theFile']['name']))
{
Echo 1;//'File uploaded';
}
}
else
{
Echo 0;//'File is not uploaded.';
};
thanks ....
Comment