Upload form files to AWS for one specific form

Iris Wu asked on April 17, 2023 18:26

Is it possible to store the user submitted form files of just one specific form (not the other forms) to AWS?

Recent Answers


Brenden Kehren answered on April 17, 2023 20:12

By default the forms are stored in /<sitecodename>/forms/ in a folder with the first 2 characters of the file GUID. You'd have to perform some action after the form is submitted to move your files into a structure you'd want to manage. On top of that, you'd also need to make sure the related form attachment is also reflecting this change in the database.

0 votesVote for this answer Mark as a Correct answer

Iris Wu answered on April 17, 2023 22:21

I can't find the /<sitecodename>/forms/ folder but instead I can find the user uploaded files stored in /<sitecodename>/BizFormFiles/. I tried to follow this guide: Storing files in different buckets to map /<sitecodename>/BizFormFiles/ folder to AWS. However in that case every files uploaded from different forms are sent to AWS but I just want files from one form e.g. by form name: Form1 being send to AWS bucket. How can I achieve this? Thanks.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 17, 2023 22:47

My mistake, you are correct, it should be /<sitecodename>/BizFormFiles/.

The documentation you provided won't change anything you're already doing. So leave that documentation. You'd have to create a global event handler in the MVC application to perform that move/update of that file to a new location in the file system, then update the form record to reflect that change as well

My question to you is why do you want to organize them by form submission in the file system when you can get each file by a form submission using the api?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.