There are 3 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-71a23354-f628-4e93-acab-fb6c9b543a54 XWIKI-24758 Closed

The files that are pasted or dropped over the editor should be uploaded as attachments of the edited page

 
View issue   ·   Add comment
 

3 updates

 
cid:jira-generated-image-avatar-8b6dc255-f830-444e-bacf-20d7c3d69dd9 Changes by Marius Dumitru Florea on 03/Nov/26 19:05
 
Resolution: Fixed
Tests: Integration
Status: In Progress Closed
 
 

1 comment

 
cid:jira-generated-image-avatar-8b6dc255-f830-444e-bacf-20d7c3d69dd9 Marius Dumitru Florea on 03/Nov/26 19:04
 

Merged in 71c7df7 (PR #7047). Summary of the changes:

  • The files pasted or dropped over the BlockNote editor are now uploaded as attachments of the edited page.
  • An image is inserted as an image block pointing to the uploaded attachment (saved as [[image:photo.png]]). Any other file (including video, audio and PDF) is inserted as an attachment link (saved as [[attach:report.pdf]]), matching the CKEditor behaviour.
  • Pasted files are renamed after the paste timestamp (e.g. 1684887709-691.png) so that a second pasted screenshot doesn't overwrite the first one. Dropped files keep their name; a generated name is used only when the file has none (no name prompt is shown, the generated name being the fallback proposed by this issue).
  • Outside a realtime session the files go to the temporary attachment store and are attached only when the document is saved, so cancelling the edit leaves nothing behind. In a realtime session they are attached right away, since any collaborator may be the one who saves.
  • When the upload fails, the inserted block is removed and the user is notified.
  • The image block displays the file name when the image can't be displayed (e.g. a deleted attachment), and a spinner is shown while a file is uploading.

Known limitations / follow-ups:

  • Dropping a file with the name of an existing attachment replaces that attachment (new version), without warning — same as CKEditor and the Attachments tab.
  • There's no real upload progress bar, only a spinner.
  • Images inside pasted HTML are not uploaded; tracked by XWIKI-25645.