Hello,
I would like to know how to delete physically a binarie file when in an automation chain we "remove content" of a metadata field ? Is it done with an automation operation ?
thank you
Hi,
In the admin center, you can remove all orphans binaries via an action (cf. screencap)
When you remove a blob from a document, only the link is destroyed between the Nx document and the binary. (e.g. http://localhost:8080/nuxeo/site/automation/doc?id=Blob.Remove on your local Nuxeo server)
Here is the code doing the job:
import org.nuxeo.ecm.core.storage.sql.management.RepositoryStatus; RepositoryStatus status = new RepositoryStatus(); if (!status.isBinariesGCInProgress()) { status.gcBinaries(true); }
Ok thank you very much.