Prevent attached files from being renamed

Hello everybody !

I have a question for you :

I enabled the " store.file.directory " option in the xwiki.properties file.

If I create a new page on my xwiki and I upload a file like “tuto.pdf” or “cup.jpg” or any standard file.
When I follow the path where the files are, I fall on a very weird path :

/var/lib/xwiki/data/store/file/xwiki/5/2/ad961c4049b7395e213f8b9c493531/attachments/f/1/45ee25bbe0c54ad1d8d3598d5b4191/f.pdf

and finally my file was renamed from “tuto.pdf” to f.pdf
And it’s the same for all of my upload.

2 questions for you :

Do you know if it’s possible to let the name of the file who was uploaded, in original name ?

And how can I change this very long path in just /var/lib/xwiki/data/store/file to get all of them in just 1 or 2 folder max ?

I don’t know if it’s possible, but if you have an idea, I take it !

My conf : tomcat9/mysql

Thank you !

There is no option for that, right now.

It’s not possible. That path look like this to actually not be too long, one thing to keep in mind is that attachment are stored at page level, so you need the reference of the page in your path and then the name of the attachment might be pretty long too. If you keep original references and files names in the store, you get endless problem with various filesystem that we have to support (like with Windows NTFS support for example).

Oh okey I understand
I will keep in mind this info !

Thank you very much for your answer !