[OSM-dev] Uploading GPX file via API 0.6

Michael M useforpublic at hotmail.de
Mon Sep 20 14:12:36 BST 2010



Hello,

I am trying to upload a GPX file by using the API 0.6. I am using the server http://api06.dev.openstreetmap.org/ for testing purposes. I am sending the attached data to the server. The server response is 500  (internal server error) and no further informations. I suggest that something is wrong with the header data, the gpx file should be ok.

Regards

Michael

++++++++++++++++++++++++++++++++


POST /api/0.6/gpx/create HTTP/1.1
Authorization: Basic dXNlZm9ycHVibGljQGhvdG1haWwuZGU6eWFxMTJ3c3g=
Content-Type: multipart/form-data; boundary=----------------------------d10f7aa230e8
User-Agent: Free User Agent
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Host: api06.dev.openstreetmap.org
Content-Length: 7865
Connection: Close

------------------------------d10f7aa230e8
Content-Disposition: form-data; name="file"; filename="test.gpx"
Content-Type: application/octet-stream

<?xml version="1.0" encoding="utf-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.topografix.com/GPX/1/1">
  <trk>
    <name>test</name>
    <trkseg>
      <trkpt lat="52.5633193" lon="9.7764445">
        <ele>37.1480713</ele>
        <time>2010-09-18T12:53:43.1924714+02:00</time>
      </trkpt>

.........

   </trkseg>
  </trk>
</gpx>
------------------------------d10f7aa230e8
Content-Disposition: form-data; name="description"

beschreibung
------------------------------d10f7aa230e8
Content-Disposition: form-data; name="tags"

merkmale
------------------------------d10f7aa230e8
Content-Disposition: form-data; name="visibility"

private
------------------------------d10f7aa230e8-- 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100920/b8e1fd96/attachment.html>


More information about the dev mailing list