Hello,
I’m trying to upload images to an Ushahidi instance (trashswag.com) but it’s not going through. We’re working on the Windows 8 and Windows Phone 8 platforms.
Here’s some details:
This is the POST url:
https://trashswag.com/api?task=report?incident_title=test&incident_description=test&incident_category=1&location_name=165
Upper Madison Ave, North York, ON M2N, Canada&latitude=43.764468&longitude=-79.412508&incident_date=06-25-2013&incident_hour=5&incident_minute=30&incident_ampm=pm&task=report
This is the response message:
{StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Pragma: no-cache
Cache-Control: must-revalidate, no-cache
Date: Tue, 25 Jun 2013 21:31:14 GMT
Set-Cookie: ushahidi=f2f7577b55334f2f1cc2653740e6794b; expires=Tue, 25-Jun-2013 23:31:14 GMT; path=/; HttpOnly
Set-Cookie: ushahidi=f2f7577b55334f2f1cc2653740e6794b; expires=Tue, 25-Jun-2013 23:31:14 GMT; path=/; httponly
Server: nginx
Content-Type: application/json; charset=utf-8
Expires: Sat, 26 Jul 1997 05:00:00 GMT
}}
And then this is the content of that message:
Id = 1, Status = RanToCompletion, Method = "{null}", Result = "{\"code\":\"001\",\"message\":\"Missing Parameter - task.\"}"
I guess my question becomes this: Why are we being told task is missing when it's not?
FIDDLER OUTPUT
Message
Content-Type: multipart/form-data; boundary="04b42fc6-24cd-4163-9110-252c7089c2f6"
Host: trashswag.com
Content-Length: 451858
Expect: 100-continue
--04b42fc6-24cd-4163-9110-252c7089c2f6
Content-Disposition: form-data; filename="name"; name="photo"
Content-Type: application/octet-stream
Content-Length: 451584
Content-Transfer-Encoding: binary
Content-Encoding: binary
//Content removed for readability
--04b42fc6-24cd-4163-9110-252c7089c2f6--
Response
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 26 Jun 2013 13:46:16 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
Pragma: no-cache
Cache-Control: no-cache, must-revalidate
Expires: Sat, 26 Jul 1997 05:00:00 GMT
Set-Cookie: ushahidi=a43a13b2c839d526b5d6f886e364af9b; expires=Wed, 26-Jun-2013 15:46:16 GMT; path=/; HttpOnly
Set-Cookie: ushahidi=a43a13b2c839d526b5d6f886e364af9b; expires=Wed, 26-Jun-2013 15:46:16 GMT; path=/; httponly
Content-Length: 52
{"code":"001","message":"Missing Parameter - task."}
Please send me an email if you can help. Any help is greatly appreciated.
-Mark