add ctrl+s to download image

This commit is contained in:
Qing
2024-01-01 16:37:29 +08:00
parent 79a41454f6
commit b0e009f879
3 changed files with 38 additions and 4 deletions

View File

@@ -176,8 +176,7 @@ export async function downloadToOutput(
) {
const file = await srcToFile(image.src, filename, mimeType)
const fd = new FormData()
fd.append("image", file)
fd.append("filename", filename)
fd.append("file", file)
try {
const res = await fetch(`${API_ENDPOINT}/save_image`, {