Forum Discussion

Salini_Sivasubramanian's avatar
2 years ago

Removing file from vault via server Event

Hai ,

I do have a requirement to delete unused files from vault , because it consumes memory . So I was trying to deleting files via server event which does not have any relationship . But I was not able to reach vault . Please help me to find a solution in this requirement. 

Thanks in advance !!

2 Replies

  • Hi Salini,

    your question is similar to this discussion:

     link 

    The thread contains a post from Chris that shows how to discover orphaned files. You can modify his sample code to delete the orphaned files.

    There is not ready-to-use code sample for "deleting files" available, cause there is an unspoken rule in this forum to not share potential dangerous code that can destroy some ones data. But it´s not hard to modify the query. I use something similar in my data base for cleanup and it works excellent.

    Angela