I am trying to get the binary URL from Broker DB. I tried the below content delivery API. I am getting null value. But binary is published into Broker and it is available when I query the DB. Any thoughts on this?
I tried with fully qualified TCM ID of the binary as well as binary short ID.
//create a new BinaryMetaFactory instance:
BinaryMetaFactory binaryMetaFactory12 = new BinaryMetaFactory();
//find the metadata for the specified binary
BinaryMeta binaryMeta12 = binaryMetaFactory12.GetMeta("tcm:255-14072");
//print the path to the output stream:
if (binaryMeta12 != null)
{
}
other way
Tridion.ContentDelivery.DynamicContent.BinaryFactory factory = new BinaryFactory();
//BinaryData binaryData = factory.GetBinary("14072".ToString());
BinaryData binaryData = factory.GetBinary(Convert.ToInt32(255), Convert.ToInt32(14072));
BinaryFactory.GetBinary
? You may also have to specify a Variant ID. See, for example: github.com/sdl/dxa-web-application-dotnet/blob/master/…