Renaming attachments

Thank you Alex! This can be very useful in many field settings.

Don’t want to understate with another feature request, but since we are talking about attachments, I’ll submit here a comment of a colleague:
"If I can highlight an issue that we are facing is the inability to rename the file, maybe by the field code of the attachment field. This would help a lot for bulk download of attachments. "

Thanks!

2 Likes

To clarify, @luigi.casella_avsi.o, this is the naming of the files in the “Attachments Only” export?

This is what the zip file looks like now:

Alex/AB Passport Photo.jpg
Alex/Signature_2025-07-03_12_15_52.png  
Bob/Bob-Passeport.jpg
Bob/Signature_2025-07-03_12_16_37.png  

In this example, “Alex” and “Bob” are the record labels of the records, and there are two different attachment fields: “ID Photo” and “Signature”. Should we have an additional folder level for fields, or do you mean the field code should be included in the file name? Let me know what would be most useful!

I guess @luigi.casella_avsi.o means that it would be nice to have an option to rename photo_2025-07-03_3536.jpg (uploaded by someone else) to Passport_Page_1.jpg directly in the database, before downloading the attachments

2 Likes

Let me explain the case in which the problem arose.

We have a form with different Attachment fields (photo / ID / etc..). If a beneficiary has an ID with him/herself, we take a photo of it, unless, in a different field we take the picture of the person.

The problem, as @mitya guessed, is that the name of the file (especially when it’s a photo taken from the app) does not carry any information regarding the field in which it’s stored. When we download the attachments, we have a nice folder structure that puts the attachments in folders named with the record label field, but then inside this folder we find files named “100000001.jpeg” or something of this kind.

I think that it would be super useful to have a feature to decide how the files should be named (like that I can decide through a CONCAT() that I want to name the file ID_BeneficiaryCode_####.jpeg or Photo_BeneficiaryCode_####.jpeg, where BeneficiryCode is the code for the Record Label field, and in place of #### we have a serial number.

Sorry for late response..