mirror of
https://github.com/docmost/docmost.git
synced 2025-11-19 09:41:11 +10:00
feat: enhance editor uploads (#895)
* * multi-file paste support * allow media files (image/videos) to be attachments * insert trailing node if file placeholder is at the end of the editor * fix video align
This commit is contained in:
@ -17,8 +17,11 @@ export const uploadAttachmentAction = handleAttachmentUpload({
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
validateFn: (file) => {
|
||||
if (file.type.includes("image/") || file.type.includes("video/")) {
|
||||
validateFn: (file, allowMedia: boolean) => {
|
||||
if (
|
||||
(file.type.includes("image/") || file.type.includes("video/")) &&
|
||||
!allowMedia
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (file.size > getFileUploadSizeLimit()) {
|
||||
|
||||
Reference in New Issue
Block a user