Hello all,
I’d like to introduce my work on the integration of the possibility to move and rename attachments.
You can find the corresponding design page here Attachments Move and Rename (Proposal.Attachmentsmoveandrename) - XWiki.
This work will be composed of 3 main tasks:
- offering an UI and an API to move and rename attachments
- automatic refactoring of attachments (i.e., references to attachments, for instance on images, are automatically renamed after a move or a rename).
- this will require to maintain a list of relations between attachments location and use of attachments locations
- automatic redirection from old attachment location to new attachment location
I propose to start by working on these tasks in this order. Until refactoring and redirection are implemented, the UI will include warning inform users of the consequences of their actions.
User Interface
I propose to keep it simple in a first time and to integrate a button next to the delete button in the attachment panels, and to introduce a page following the same pattern as the one we currently have for page rename and move.
Architecture
I propose to introduce two new modules xwiki-platform-attachment-api
and xwiki-platform-attachment-default
.
The API provides the scrip services, templates and roles for the attachments operations (currently move and rename but could en enriched later).
The default module provides the default implementation for the roles defined in the API.
Let me know what you this and if you have suggestion on how to make this improvement better.
PS: Some related technical topics will need to be discussed in other discussions, for instance the database table to use to map the location and user of the attachments, or how to minimize disk-usage by prevent attachments duplication on disk.