Opened 12 years ago

Closed 12 years ago

#1291 closed defect (worksforme)

Public is ignored when uploading GPX traces with API

Reported by: dtbow Owned by: Tom Hughes
Priority: minor Milestone:
Component: api Version:
Keywords: gpx upload public Cc:


I'm trying to upload a GPX trace using the API. My HTTP request body looks like:

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

<?xml version="1.0" encoding="UTF-8"?> <gpx version="1.1" creator="GPXTrace" xmlns="">



<trkpt lat="37.331689" lon="-122.030731">






--0xKhTmLbOuNdArY Content-Disposition: form-data; name="description"

Es --0xKhTmLbOuNdArY Content-Disposition: form-data; name="tags"

D --0xKhTmLbOuNdArY Content-Disposition: form-data; name="public"

0 --0xKhTmLbOuNdArY--

(Line breaks may look wrong in the list above, but are correct in the real request.) The file is getting accepted, however the web interface reports it is public.

Change History (1)

comment:1 Changed 12 years ago by Tom Hughes

Resolution: worksforme
Status: newclosed

I can't reproduce this - your example is too mangled to be useful (it's better to attach things like that rather than pasting them in) but the DirectUpload? plugin in JOSM uses this API and is able to upload both public and private traces correctly.

Note: See TracTickets for help on using tickets.