chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2023-10-30 13:44:27 +01:00
parent a0218253ce
commit 9ee3343426
154 changed files with 5959 additions and 3840 deletions

View file

@ -68,7 +68,11 @@ export class ImageUploadManager {
* @param tagsStore The tags of the feature
* @param targetKey Use this key to save the attribute under. Default: 'image'
*/
public async uploadImageAndApply(file: File, tagsStore: UIEventSource<OsmTags>, targetKey?: string): Promise<void> {
public async uploadImageAndApply(
file: File,
tagsStore: UIEventSource<OsmTags>,
targetKey?: string
): Promise<void> {
const sizeInBytes = file.size
const tags = tagsStore.data
const featureId = <OsmId>tags.id
@ -98,7 +102,13 @@ export class ImageUploadManager {
].join("\n")
console.log("Upload done, creating ")
const action = await this.uploadImageWithLicense(featureId, title, description, file, targetKey)
const action = await this.uploadImageWithLicense(
featureId,
title,
description,
file,
targetKey
)
if (!isNaN(Number(featureId))) {
// This is a map note
const url = action._url