Fix the issue where base64 images cannot be saved (#11398)

This commit is contained in:
Caelan 2025-11-22 20:20:02 +08:00 committed by GitHub
parent 1cb2af57ae
commit f98a063a8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -481,6 +481,11 @@ const DmxapiPage: FC<{ Options: string[] }> = ({ Options }) => {
window.toast.warning(t('message.empty_url'))
return null
}
if (url.startsWith('data:image')) {
return await window.api.file.saveBase64Image(url)
}
return await window.api.file.download(url, true)
} catch (error) {
if (