PDA

View Full Version : Not working file upload in Chrome



webtrash
21 May 2010, 1:19 AM
Hello!
I tested it in stable and beta.
I created upload form like in this example: http://www.extjs.com/deploy/dev/examples/form/file-upload.html and it's not working. Message "Uploading your photo..." is not disappearing (but form upload is working and script's result returned : {success:true, file:"myfile.png"}). In other browsers (FF, Opera, IE) - everything ok, message about success uploading is showing.

Example (http://www.extjs.com/deploy/dev/examples/form/file-upload.html) is not working too. The same problem.

What's wrong?

aapplle
1 Jun 2010, 9:52 AM
In the API document of Class Ext.form.BasicForm

something is mentioned in the paragraph about "File Uploads"
".... If the server is using JSON to send the return object, then the Content-Type header must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body. .. "

Maybe this will be helpful to you

webtrash
1 Jun 2010, 9:59 PM
In the API document of Class Ext.form.BasicForm

something is mentioned in the paragraph about "File Uploads"
".... If the server is using JSON to send the return object, then the Content-Type header must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body. .. "

Maybe this will be helpful to you

Thanks, but it's not working too :(
Here's headers :


Request URL:http://localhost/ajax/imageupload
Request Method:POST
Status Code:200 OK

Request Headers
Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryFQzG01GeXcAV1Azs
Origin:http://localhost
Referer:http://localhost/index.php/admin/index
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.55 Safari/533.4
Request Payload
------WebKitFormBoundaryFQzG01GeXcAV1Azs
Content-Disposition: form-data; name="image_1"; filename="27389.png"
Content-Type: image/png


------WebKitFormBoundaryFQzG01GeXcAV1Azs
Content-Disposition: form-data; name="image_2"; filename=""


------WebKitFormBoundaryFQzG01GeXcAV1Azs
Content-Disposition: form-data; name="image_3"; filename=""


------WebKitFormBoundaryFQzG01GeXcAV1Azs
Content-Disposition: form-data; name="image_4"; filename=""


------WebKitFormBoundaryFQzG01GeXcAV1Azs
Content-Disposition: form-data; name="image_5"; filename=""


------WebKitFormBoundaryFQzG01GeXcAV1Azs
Content-Disposition: form-data; name="image_6"; filename=""


------WebKitFormBoundaryFQzG01GeXcAV1Azs
Content-Disposition: form-data; name="image_7"; filename=""


------WebKitFormBoundaryFQzG01GeXcAV1Azs
Content-Disposition: form-data; name="product_id"

14
------WebKitFormBoundaryFQzG01GeXcAV1Azs--

Response Headers
Connection:Keep-Alive
Content-Language:ru
Content-Length:186
Content-Type:text/html; charset=utf8
Date:Wed, 02 Jun 2010 05:52:35 GMT
Keep-Alive:timeout=5, max=100
Server:Apache/2.2.4 (Win32) mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.4
X-Powered-By:PHP/5.2.4

Response content :

{"success":true,"msg":"","count":1,"result":[{"imgPath":"img\/goods\/dfe7c16b806628eca174d9ee6e7c8182_27389.png","fileName":"dfe7c16b806628eca174d9ee6e7c8182_27389.png","success":true}]}

GRboss
2 Dec 2010, 2:40 AM
Hello out there.

I have the same problem. Has it been solved somehow?

Thanks!