Hi people, I’m writing here cause I’ve a problem with a file upload form using ajax.
File upload can’t be executed with ajax and i solved it using <iframe></iframe>
so my form look like this:
<form name="myform" id="myform" method="post" action="myController/actionFileUpload" enctype="multipart/form-data" target="upload_target">
File: <input name="myfile" type="file" />
<input type="submit" name="submitBtn" value="Upload" />
<iframe id="upload_target" name="upload_target" style="width:0;height:0;border:0px solid #fff;"></iframe>
When i submit the file, yii doesn’t call myController/actionFileUpload but it call myController/actionIndex
How can it be solved?