Replies: 2 comments 1 reply
-
Hello @IDmedia! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve any issues you're facing. To manage file retention and deletion in Dify workflows, you can use the Regarding the deletion of uploaded files via the API, there isn't a specific DELETE endpoint for removing files by their curl --location --request DELETE 'https://api.dify.ai/v1/datasets/{dataset_id}/documents/{document_id}' \
--header 'Authorization: Bearer {api_key}' This endpoint allows you to manage and delete documents effectively [2]. |
Beta Was this translation helpful? Give feedback.
-
This is because the preview url is signed with token, and this token may not live for a very long time. This ensures the safety of the file itself. And this is a common practice as well. If you want to remove files in s3 or some local machines. This can be done call this method. dify/api/extensions/ext_storage.py Lines 114 to 119 in 51db596 |
Beta Was this translation helpful? Give feedback.
-
Self Checks
Provide a description of requested docs changes
I have created a workflow that processes multiple PDF files uploaded via the "Start" node. These files are used in a Doc Extractor node. However, I’ve noticed that files accumulate quickly over time.
According to the Dify documentation:
"File Upload: Typically for temporary use, not stored long-term in the system."
Questions:
Is there a way to configure a file upload retention policy to automatically delete files after a certain period?
When files are uploaded and the workflow is executed via the API, I couldn’t find a DELETE endpoint to remove uploaded files using their file_id. Is such an endpoint available, or is there an alternative solution?
Beta Was this translation helpful? Give feedback.
All reactions