Generate ad hoc file

Hi, I need to allow user to download content of Rich Text input element. I have created Microflow which creates document using StringToFile community commons action which generates FileDocument and sends it to the customer using “Download file” client activity. The problem is this file should not be persisted on the server since it contains sensitive data. I tried to write custom Java action to delete the file, but when putting it on micro flow after “Download file” activity the download popup just doesn't show. The same when using “Delete objects”. Any hint how to do it properly?
1 answers

There is a delete after download option when working with filedocuments. So you do not need to do this yourself. Just make sure the boolean is set to true when creating the filedocument.