forked from MapComplete/MapComplete
UX: add proper delete dialog, add option to report images
This commit is contained in:
parent
8690ad35bb
commit
5b618dc367
18 changed files with 334 additions and 176 deletions
|
@ -88,4 +88,12 @@ export default abstract class ImageProvider {
|
|||
}): Promise<LicenseInfo>
|
||||
|
||||
public abstract apiUrls(): string[]
|
||||
|
||||
public static async offerImageAsDownload(image: ProvidedImage){
|
||||
const response = await fetch(image.url_hd ?? image.url)
|
||||
const blob = await response.blob()
|
||||
Utils.offerContentsAsDownloadableFile(blob, new URL(image.url).pathname.split("/").at(-1), {
|
||||
mimetype: "image/jpg",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue