I’m currently trialing the file manager and encountered an issue.
If create a file manager with the below structure (would be nice if I could help explain this with some images)
User Data (ID = ‘0’)
|
|-> New Folder (ID = ‘1’)
|
|-> New Folder (ID = ‘2’)
When I click on each of the folders the url fragment shows the below
User Data → ‘#!/0’
New Folder → ‘#!/1’
New Folder → ‘#!/2’
So far so good, if I rename ‘New Folder’ with Id ‘1’ to say ‘New Name’ the server sends back a response of {id: 1, value: ‘New Name’} (the id stays the same). The below url fragments now show for each of my folders
User Data → ‘#!/0’
New Name → ‘#!/1’
New Folder → ‘#!/1/New%20Folder’ ← This is incorrect, should be ‘#!/2’
If I then try to rename ‘New Folder’ to something the id sent to the server is ‘1/New%20Folder’ instead of ‘2’
If I send an empty object response ‘{}’ the above works. But then if the user renames a folder which uses an invalid name (i.e. a duplicate folder name or it contains invalid chars) and I want to send back a response to use the original name the same issue will occur.
It would be nice to do the name validation on the client side, I presume there is a way to do this but haven’t looked into it yet?
I did find a similar issue back in 2016 ‘Bug: Filemanager RENAME’ and said it was fixed?
I have ‘noFileCache’ set to false and I am using dynamic loading (it would be nicer if the variable was just ‘FileCache : True/False’ rather than ‘noFileCache: True/False’)