November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Forms store upload files in "Local Asset Folder" of the [File Upload] element. So you can find the element in your form, then list all the content below "Uploaded Files" folder, you will get all the upload files. Below is how you can find the folder:
var assetFolder = _contentAssetHelper.Service.GetOrCreateAssetFolder(elementContentLink);
var folder = _contentRepository.Service.GetChildren<ContentFolder>(assetFolder.ContentLink)
.FirstOrDefault(f => f.Name.Equals(Constants.FileUploadFolderName));
elementContentLink in this case is your File Upload element's content link.
Thanks for your reply. I marked it as the answer for my question. I had to change
_contentRepository.Service.GetChildren<ContentFolder>
to
_contentRepository.Service.GetChildren<MediaData>
In order to get my solution to work as expected.
Hi!
I need a way to programatically get all uploaded files for a form that uses the "File Upload" component and has the checkbox "store form submissions" checked.
Any suggestions on how to accomplish this?
Best regards!