Description:
This pull request adds the ability for users to rename files and folders in the submission tree of an upload. A "Rename" button is added to the submission tree view, and clicking on it will bring up a text box where the user can enter the new file/folder name. The file/folder name will be updated in the submission tree and the file/folder will be renamed in the database.
Implementation details:
Added routes for file and folder renaming
Added views for the rename button and the rename modal
Added controllers to handle file and folder renaming requests
Added policies to authorize file and folder renaming actions
Added events to track file and folder renaming actions
Added RSpec tests to cover the file and folder renaming functionality
Testing:
I have tested this feature on multiple files and it is working as expected.
I have verified that the file is renamed in the database.
I have tested that the file can be renamed multiple times.
I have tested that the file renaming feature works correctly with special characters and file names with spaces.
When downloading the uploads, the files have the updated renamed name when saved locally.
Renaming folders works as expected.
Renaming of subfolders and subfiles works as expected.
Invalid renaming, such as renaming of non-existing folders and files, is handled correctly.
Renaming with taken file and folder names is handled correctly.
Policies for file and folder renaming are handled correctly.
Description: This pull request adds the ability for users to rename files and folders in the submission tree of an upload. A "Rename" button is added to the submission tree view, and clicking on it will bring up a text box where the user can enter the new file/folder name. The file/folder name will be updated in the submission tree and the file/folder will be renamed in the database.
Implementation details:
Testing:
New submission tree view:
File rename view:
Folder rename view:
Feedback:
Events: