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 = {
"file": gpx,
"description": options.description,
"tags": options.labels.join(","),
"description": options.description ?? "",
"tags": options.labels?.join(",") ?? "",
"visibility": options.visibility
}
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;