Add default values for gpx upload
This commit is contained in:
parent
5360d269a6
commit
f48d1a06c3
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue