Delete downloaded files in workflow after ran

We have workflow to download file from one location and upload the same in other location.
workflow runs each 30 mins and each file size is more than 10mb, we are facing space error due to keeping all the downloaded files, how to delete the downloaded file after uploading

Hey @Shalini,

Where would you be deleting them from?

When downloading where these files are stored? we need to delete these after uploading to the expected location

Hey @Shalini,

That depends on your n8n configuration they could be in memory or on the filesystem. If you have not set n8n to use the filesystem option they will be in memory.

If you have N8N_DEFAULT_BINARY_DATA_MODE set to filesystem the files will be temporarily kept under ~/.n8n/binaryData and should be automatically deleted.

temp files stored will be deleted after the workflow execution or while execution after the N8N_PERSISTED_BINARY_DATA_TTL time?
I think its deleting after the workflow completion as we are facing memory error on execution, is there a way to clear the temp files once upload happens?

Hey @Shalini,

You got it, So that should configure the time. If you need to delete it sooner you would need to create a workflow or a script to handle that although the binary items on disk shouldn’t cause a memory error.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.