File Manager discards custom name

0
Hello, I created an entity with generalization from the fileDocument entity and generated overview pages automatically. Now when I upload a file I choose a custom name for it but pressing save automatically adds the file name as the name attribute discarding the name I entered myself. Editing the file however saves it with the name I specify then. Is that normal? How can I overcome this? Do I have to create and call a custom to save the name?
asked
1 answers
5

Are you trying to change the “Name” attribute from the generalization “FileDocument”? If so, I'd recommend instead using an extra attribute in your specialization (like “CustomName” or so) and showing that in your application. This also prevents the user from changing the filename into something that breaks the file (for instance, by removing the “.docx” after the filename).

That way, you'll still have the original filename as it was uploaded stored safely in the FileDocument.Name attribute, but a separate attribute for the name you want to show throughout your application. This would still be a problem when downloading / exporting the file, but if that is the case you could still use a custom flow to set the filename to the custom name the user chose plus the correct file extension.

answered