MapComplete/src/UI/Test.svelte

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
527 B
Svelte
Raw Normal View History

<script lang="ts">
import FileSelector from "./Base/FileSelector.svelte"
import ExifReader from "exifreader"
import { UIEventSource } from "../Logic/UIEventSource"
let txt = new UIEventSource("")
async function accept(fileList: FileList) {
const tags = await ExifReader.load(fileList.item(0))
console.log("All tags:", tags)
txt.set(tags.ProjectionType.value)
}
</script>
2024-11-24 23:19:17 +01:00
2025-06-04 00:21:28 +02:00
<FileSelector on:submit={(fileList) => accept(fileList.detail)} accept="image/jpg">
Select file
</FileSelector>
<b>{$txt}</b>