save image for TWA

This commit is contained in:
Timi
2026-09-22 15:41:12 +08:00
parent ac4d65808a
commit 5465fb7b27
15 changed files with 880 additions and 3 deletions
@@ -60,6 +60,7 @@ import { getAttachmentReadURL } from "@/utils/attachment";
import { getErrorMessage } from "@/utils/error";
import { compressUploadImageList } from "@/utils/imageCompression";
import { Message } from "@/utils/message";
import { saveCapturedFilesFromInput } from "@/utils/twaBridge";
defineOptions({
name: "EventRecordVerifyDialog"
@@ -131,6 +132,7 @@ async function handlePhotoSelected(event: Event): Promise<void> {
if (!fileList.length) {
return;
}
saveCapturedFilesFromInput(input, fileList);
isPhotoUploading.value = true;
try {
@@ -52,6 +52,7 @@ import type { MediaSelectorAddAction, MediaSelectorViewerItem } from "./types";
import { getMediaPreviewURL, normalizePhotoItem } from "./utils";
import type { PhotoItem } from "@/types/Photo.ts";
import { Message } from "@/utils/message.ts";
import { saveCapturedFilesFromInput } from "@/utils/twaBridge";
defineOptions({
inheritAttrs: false
@@ -142,6 +143,7 @@ async function handleFileChange(event: Event): Promise<void> {
if (!fileList.length || !props.upload) {
return;
}
saveCapturedFilesFromInput(input, fileList);
isUploading.value = true;
try {