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 !!

Parents
  • Hi Salini,

    your question is similar to this discussion:

     RE: How can I find orphaned files in the Vault? 

    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

Reply
  • Hi Salini,

    your question is similar to this discussion:

     RE: How can I find orphaned files in the Vault? 

    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

Children