Implement uploaded image versioning & deletion #616

Closed
opened 2026-02-04 21:27:45 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @ssddanbrown on GitHub (Mar 28, 2018).

Originally assigned to: @ssddanbrown on GitHub.

Just want to finish off the base drawing system implementation.

Currently two flaws in the drawing system to address:

  • Updating drawings will overwrite the old file, Even if the page is not saved.
  • No current way to delete drawings

Implementation details

  • Versions must be saved as separate versions on the file-system.
  • Upon delete all versions should be deleted.
  • Maybe abstract versioning to all images? Yep

Plan

  • New Model/Table - Image Revision
    • Has fields: id, image_id, path, url, revision#, uploaded_by, timestamps
  • On migration, migrate old paths & urls to new table before removal from images table.
  • Build in updating/revisioning into image manager.
  • Build drawings view into image manager.
Originally created by @ssddanbrown on GitHub (Mar 28, 2018). Originally assigned to: @ssddanbrown on GitHub. Just want to finish off the base drawing system implementation. Currently two flaws in the drawing system to address: - [ ] Updating drawings will overwrite the old file, Even if the page is not saved. - [ ] No current way to delete drawings --- #### Implementation details * Versions must be saved as separate versions on the file-system. * Upon delete all versions should be deleted. * Maybe abstract versioning to all images? Yep #### Plan - New Model/Table - `Image Revision` - Has fields: id, image_id, path, url, revision#, uploaded_by, timestamps - On migration, migrate old paths & urls to new table before removal from `images` table. - Build in updating/revisioning into image manager. - Build drawings view into image manager.
OVERLORD added the 🛠️ Enhancement label 2026-02-04 21:27:45 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Mar 30, 2018):

Updated title to reflect increase scope of this feature.

@ssddanbrown commented on GitHub (Mar 30, 2018): Updated title to reflect increase scope of this feature.
Author
Owner

@Abijeet commented on GitHub (May 12, 2018):

For those slightly limited on resource, I would also like an option that states how many # of versions should be maintained by the system.

@Abijeet commented on GitHub (May 12, 2018): For those slightly limited on resource, I would also like an option that states how many # of versions should be maintained by the system.
Author
Owner

@ssddanbrown commented on GitHub (May 27, 2018):

This is now implemented in an alternative, simpler way to what's described in the above. See #837 for details.

The image manager can be used for drawings via a dropdown on the WYSIWYG drawing button or by Ctrl+Click'ing the 'Insert Drawing' option in the Markdown editor.

@ssddanbrown commented on GitHub (May 27, 2018): This is now implemented in an alternative, simpler way to what's described in the above. See #837 for details. The image manager can be used for drawings via a dropdown on the WYSIWYG drawing button or by Ctrl+Click'ing the 'Insert Drawing' option in the Markdown editor.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#616