xwikisas / application-diagram

Create various types of diagrams using draw.io
GNU Lesser General Public License v2.1
0 stars 8 forks source link

The Diagram document is created too soon #280

Closed rstavro closed 1 month ago

rstavro commented 3 months ago

If the save button has custom handlers to freeze the save action (for background checks or confirmation, as example), the Diagram document gets created before unfreezing / executing the the save action.

When looking at the requests, I noticed that there are some separate upload ones that attach a PNG / SVG file to the Diagram document.

Marius explained to me that there are 3 versions of the diagram document generated at save and that the current approach is not OK. Instead of actual attachments, temporary attachments should be used. The Diagram app should make 2 requests first, to save the temporary PNG and SVG files and then, at save, the two files should be indicated as temporary attachments that must be saved along with the content of the diagram

ChiuchiuSorin commented 2 months ago

A similar issue had already been solved and released in application diagram version 1.20: https://github.com/xwikisas/application-diagram/issues/252.