Add default values for gpx upload

This commit is contained in:
pietervdvn 2022-08-09 14:32:24 +02:00
parent 5360d269a6
commit f48d1a06c3

View file

@ -341,13 +341,13 @@ export class OsmConnection {
const contents = { const contents = {
"file": gpx, "file": gpx,
"description": options.description, "description": options.description ?? "",
"tags": options.labels.join(","), "tags": options.labels?.join(",") ?? "",
"visibility": options.visibility "visibility": options.visibility
} }
const extras = { const extras = {
"file": "; filename=\""+options.filename+"\"\r\nContent-Type: application/gpx+xml" "file": "; filename=\""+(options.filename ?? ("gpx_track_mapcomplete_"+(new Date().toISOString())))+"\"\r\nContent-Type: application/gpx+xml"
} }
const auth = this.auth; const auth = this.auth;