Delete Temp Uploads Scheduled Task in Azure App Services

Peter Vanderhoef asked on September 22, 2023 18:10

Our client has a Kentico 13 instance hosted in Azure via two Azure App Services (CMS site and MVC site). They have a form builder form setup using the file uploader component. We noticed that the temporary uploads folder is not being cleared out by the "Delete old temporary upload files" job. In the CMS site, we see the job running regularly and there are no errors in the logs.

By default when the scheduled job runs, does it only run the delete/cleanup process on the CMS site or does it send out a notification to the farm to start the delete/cleanup process? If it's the latter, are there any special configurations they may have missed due to their Azure setup?

Recent Answers


Eric Dugre answered on September 22, 2023 19:12

Hello Peter!

Are the files you're referring to located in /CMSTemp/FormFileUploader? This is the temporary files folder for the form upload component. However, the "Delete old temporary upload files" task isn't responsible for clearing the content of this folder (or any live site data). The task is global and all global tasks run in the context of the CMS project only (docs).

On the live site, temporary form uploads are promoted to "permanent" uploads after the form is successfully submitted (docs). So, there should really not be any files in this folder at all. Are the uploaded files actually moved to the permanent BizForm files location? Could there be some permissions set on the temporary files folder that is preventing the files from moving?

0 votesVote for this answer Mark as a Correct answer

Peter Vanderhoef answered on September 22, 2023 19:34

Hey Eric, thanks for the reply!

Correct, it's the files in the FormFileUploader folder. The reason this got flagged is because the directory hit the default size limit allowed for denial of service prevention documented here. In that article it mentioned that the temporary files are deleted via the task I mentioned previously, I assumed it was for files in the FormFileUploader directory.

I do see a lot of files in the BizForm directory (some from today) so it does appear that it can transfer them as expected.

0 votesVote for this answer Mark as a Correct answer

Peter Vanderhoef answered on September 29, 2023 17:58

I've tried testing this in a single server (non app service) environment. When I run the "Delete old temporary upload files" task, I do see the FormFileUploader folder being cleared out on the CMS site but never the MVC site. No matter how I configure the delete task, I can't get it to execute on the MVC site. Is it just not meant to run on the MVC site?

If that's the case, how is this folder ever cleared out? Is the folder supposed to be synced with the CMS site?

It seems possible for users to not complete their forms and have their files stuck on the server (eventually building up over time). I would imagine others have run into this, unless something isn't configured right in our Kentico instance.

0 votesVote for this answer Mark as a Correct answer

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