Hi Asgaroth,
Thanks for the Extionsion. Everything was working good. However, I got a problem after I added the following code.
<code>//here you can also generate the image versions you need
//using something like PHPThumb
Yii::import("ext.EPhpThumb.EPhpThumb");
$thumb_=new EPhpThumb();
$thumb_->init();
$thumb_->create($path.$file_image_name)->resize(110,80)->save($path.$file_thumb_name); </code>
The thumbnail was generated successfully, but keep getting Error SyntaxError: Unexpected token in front-end, and the following piece of template was executed.
{% for (var i=0, file; file=o.files[i]; i++) { %}
<tr class="template-download fade">
{% if (file.error) { %}
<td></td>
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
<td class="e
Chrome record:
Request URL:http://www.mysite.com/api/imageUpload/upload
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, /; q=0.01
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:2242
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryTWpRfMNYQy9oLQGB
Cookie:PHPSESSID=s54ongnoa5bbdd4rp432pao710
Host:pampersbbfacility.e-crusade.com
Origin:http://www.mysite.com
Referer:http://www.mysite.com/newfacility
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4
X-Requested-With:XMLHttpRequest
Request Payload
------WebKitFormBoundaryTWpRfMNYQy9oLQGB
Content-Disposition: form-data; name="XUploadForm[file]"
------WebKitFormBoundaryTWpRfMNYQy9oLQGB
Content-Disposition: form-data; name="XUploadForm[file]"; filename="img-1.jpeg"
Content-Type: image/jpeg
------WebKitFormBoundaryTWpRfMNYQy9oLQGB–
Response Headersview source
Cache-Control:public, max-age=10800
Connection:close
Content-Length:4315
Content-Type:application/json
Date:Sun, 30 Sep 2012 07:26:45 GMT
Expires:Sun, 30 Sep 2012 10:26:46 GMT
Last-Modified:Wed, 01 Aug 2012 10:46:00 GMT
Server:Apache/2.2.8 (CentOS)
Vary:Accept
X-Powered-By:PHP/5.2.10
Please help me, I have been struggling with it for a long time. Thanks a lot.