Upload Photo Old Version
From EveryTrail API Developer Documentation
Version 2.0
You add photos to a trip by sending an HTTP post request to http://www.everytrail.com/api/trip/uploadphoto with the following parameters:
- photo (binary data)
- name
- desc (optional)
- lat
- lon
- time (yyyy-mm-dd hh-mm-ss)
- trip_id
- username (username of the owner of the trip. we check to make sure the user owns the trip)
- password (password for the user)
If the request is successful, you will receive the following response body <picture>###</picture>, where ### is the new picture_id Otherwise, you will get a response in the format <error>###</error>
Error Codes
- 104 - no photo uploaded
- 105 - invalid trip id
- 106 - upload failed
Version 1.0
You add photos to a trip by sending an HTTP post request to http://www.everytrail.com/api/trips.php with the following variables:
- photo (binary data)
- username
- password
- lat
- lon
- name
- desc
- time (yyyy-mm-dd hh-mm-ss)
- trip_id
If the request is successful, you will receive the following response body <picture>###</picture>, where ### is the new picture_id Otherwise, you will get a 401 error
Note: If the username/password is correct, but the trip_id does not belong to that user, the photo will still be uploaded, but it will not be added to that trip
