How to force conversion of media asset by remote client call

Hi all, it there a way to force conversion of media asset by remote client call? If not, how to do it using local API?

Tnx a lot! M-

0 votes

1 answers

434 views

ANSWER



Hi,

There is no operation yet to trigger the conversions of Pictures or Videos.

For Videos, you can use the VideoService:

  • VideoService#launchConvertion to launch a specific conversion
  • VideoService#launchAutomaticConversions to launch all the registered automatic conversions

For Pictures, the easiest way for now is to reset the main blob on the Picture: that will trigger all the default conversions:

BlobHolder blobHolder = doc.getAdapter(BlobHolder.class);
if (blobHolder.getBlob() != null) {
    blobHolder.setBlob(blobHolder.getBlob());
    documentManager.saveDocument(doc);
    documentManager.save();
}
1 votes