feat: GPX file import for places — closes #98
Upload a GPX file to automatically create places from waypoints. Supports <wpt>, <rtept>, and <trkpt> elements with CDATA handling. Handles lat/lon in any attribute order. Track-only files import start and end points with the track name. - New server endpoint POST /places/import/gpx - Import GPX button in PlacesSidebar below Add Place - i18n keys for DE and EN
This commit is contained in:
@@ -91,6 +91,10 @@ export const placesApi = {
|
||||
update: (tripId: number | string, id: number | string, data: Record<string, unknown>) => apiClient.put(`/trips/${tripId}/places/${id}`, data).then(r => r.data),
|
||||
delete: (tripId: number | string, id: number | string) => apiClient.delete(`/trips/${tripId}/places/${id}`).then(r => r.data),
|
||||
searchImage: (tripId: number | string, id: number | string) => apiClient.get(`/trips/${tripId}/places/${id}/image`).then(r => r.data),
|
||||
importGpx: (tripId: number | string, file: File) => {
|
||||
const fd = new FormData(); fd.append('file', file)
|
||||
return apiClient.post(`/trips/${tripId}/places/import/gpx`, fd, { headers: { 'Content-Type': 'multipart/form-data' } }).then(r => r.data)
|
||||
},
|
||||
}
|
||||
|
||||
export const assignmentsApi = {
|
||||
|
||||
Reference in New Issue
Block a user