Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How can i get mediabin resource
siva2_2000
HI,
How can I access mediabin resources in my PHP script page? If I get reference URL will be good.
Thanks & Regards
Siva
Find more posts tagged with
Comments
Migrateduser
Try to use the Web Services SDK. You should be able to use wsdl to request any images from mediabin server.
Ray Kung
IWOV tech support
kbaley
Somewhat related. I'm trying to retrieve the actual content of the asset for use in a C# web application. I'm using the MBNetModel rather than the Web Services but it seems they're almost interchangeable. Anyway, I'm guessing you use the GetLastDerivative method on the MediaBinServer object to retrieve a byte array of the asset but what are the tagID and newTagID variables for? Is tagID supposed to be the GUID for the asset you are trying to retrieve?
msnider
By asset content, do you mean the asset's metadata, previews or the actual file?
To get the asset's metadata, use GetAsset( assetID )
To get the asset's preview, use GetPreview( assetID, previewType )
To get the asset's file, use RetrieveFile( assetID, taskID, bIncludeTag, out tagID )
The 3.0 API doc has a more detailed listing of available methods and their use.
kbaley
I'll probably go with RetrieveFile but is it possible to retrieve the bytes for an asset? For example, if I want to build a web page that streams the bytes out in the Response, can I get the actual byte stream or do I need to save the asset to a file first?
msnider
There are about 6 different variations of the RetrieveFile method. The default method does return the file as a byte array from which you could stream it out to the web page or write it to a local file.
Remember, the RetrieveFile methods are used to repurpose an asset, e.g. convert a multilayered PSD to a flat JPEG, and thus correspond to executing a job on the MediaBin server. If all you need is a preview( thumbnail ) of the asset, use GetPreview to return an array containg a single JPEG file which can then be easily streamed out to a page.
kbaley
Great info, msnider. Thanks.