Web: support pasting images from clipboard

This commit is contained in:
Cao Mingjun
2023-11-24 14:49:56 +00:00
committed by GitHub
parent 87bcf59bd4
commit a3312f69fb
2 changed files with 33 additions and 1 deletions

View File

@@ -235,6 +235,13 @@ const PublishDialog = (props) => {
await checkAttachmentLimits(file);
};
useEffect(() => {
if (props.attachFile) {
updateAttachFile(props.attachFile);
console.log(`[PublishDialog] Attach file changed`, props.attachFile);
}
}, [props.attachFile]);
const handleAttachFileChanged = async (ev) => {
await updateAttachFile(ev.target.files[0]);
};