Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second ajax call passes bad value for original ajax response #3

Open
ghost opened this issue Mar 15, 2014 · 0 comments
Open

Second ajax call passes bad value for original ajax response #3

ghost opened this issue Mar 15, 2014 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 15, 2014

This is my second ajax response, where default is a checkbox and caption is a textbox.

key 0 appears to be what the filename of the upload file(s) should be.

array (size=3)  'default' => string '1' (length=1)  'caption' => string '' (length=0)  0 => string '[object Object]' (length=15)

first ajax header data:

Request URL:http://eddev.com/wp-admin/admin-ajax.php?action=upload_photo
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Content-Length:1218989
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryi3lHFpZGbW6cQPDl
DNT:1
Host:eddev.com
Origin:http://eddev.com
Pragma:no-cache
Referer:http://eddev.com/donors/application/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36
X-Requested-With:XMLHttpRequest
Query String Parametersview sourceview URL encoded
action:upload_photo
Request Payload
------WebKitFormBoundaryi3lHFpZGbW6cQPDl
Content-Disposition: form-data; name="file_upload_incoming"

1
------WebKitFormBoundaryi3lHFpZGbW6cQPDl
Content-Disposition: form-data; name="0"; filename="IMG_1241.JPG"
Content-Type: image/jpeg


------WebKitFormBoundaryi3lHFpZGbW6cQPDl--
Response Headersview source
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Keep-Alive
Content-Length:94
Content-Type:text/json
Date:Sat, 15 Mar 2014 22:58:14 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=5, max=100
Pragma:no-cache
Server:Apache/2.4.6 (Unix) PHP/5.5.6 mod_wsgi/3.4 Python/2.7.2 OpenSSL/1.0.0d
X-Powered-By:PHP/5.5.6

second ajax headers:

Request URL:http://eddev.com/wp-admin/admin-ajax.php?action=upload_photo
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Content-Length:50
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
DNT:1
Host:eddev.com
Origin:http://eddev.com
Pragma:no-cache
Referer:http://eddev.com/donors/application/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36
X-Requested-With:XMLHttpRequest
Query String Parametersview sourceview URL encoded
action:upload_photo
Form Dataview sourceview URL encoded
default:0
caption:
default:1
0:[object Object]
Response Headersview source
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Keep-Alive
Content-Length:5137
Content-Type:text/html
Date:Sat, 15 Mar 2014 22:58:14 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=5, max=99
Pragma:no-cache
Server:Apache/2.4.6 (Unix) PHP/5.5.6 mod_wsgi/3.4 Python/2.7.2 OpenSSL/1.0.0d
X-Powered-By:PHP/5.5.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants