mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-14 06:07:23 +08:00
Fix the issue where base64 images cannot be saved (#11398)
Some checks failed
Auto I18N Weekly / Auto I18N (push) Has been cancelled
Some checks failed
Auto I18N Weekly / Auto I18N (push) Has been cancelled
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'))
|
||||
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 (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user