Skip to content

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

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions