mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-20 15:10:59 +08:00
Fix the issue where base64 images cannot be saved (#11398)
This commit is contained in:
parent
1cb2af57ae
commit
f98a063a8f
@ -481,6 +481,11 @@ const DmxapiPage: FC<{ Options: string[] }> = ({ Options }) => {
|
|||||||
window.toast.warning(t('message.empty_url'))
|
window.toast.warning(t('message.empty_url'))
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (url.startsWith('data:image')) {
|
||||||
|
return await window.api.file.saveBase64Image(url)
|
||||||
|
}
|
||||||
|
|
||||||
return await window.api.file.download(url, true)
|
return await window.api.file.download(url, true)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (
|
if (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user