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)
RetrieveFile_DIME sample ?
hkx
Hi
I have the following C# code:
public static void RetrieveFileWithDime(string MbId, string FileName)
{
string task_id = string.Empty;
string tag_id = string.Empty;
string job_id = string.Empty;
MediaBin.Dime.MBRunTimePrimitive[] mbrp = null; //MediaBin.Dime is my web reference proxy
MediaBinServerWithDime mbs = MediaBin.CreateConnectionWithDime();
string asset = mbs.RetrieveFile_DIME(ContainerId, -1, task_id, mbrp, false, out tag_id, out job_id);
System.Diagnostics.Trace.WriteLine(asset);
}
The trace for asset string variable is always a value like this:
uri:ec31c102-6dbc-4152-b02f-b1954af0a1e5
How do I get at the actual DIME (image file) data? Is there a sample for this? I thought it would return a string array rather than a single string.
Can clients of MediaBin's web services utilise DimeReader/Writer classes forr better performance?
Thanks.
Find more posts tagged with
Comments
msnider
You use the returned id to reference the attachement in the SoapContext object. Here's a sample function:
private static Stream RetrieveDIMEAttachment( SoapContext context, string ID )
{
Stream strm = null;
if( context =!null && context.Attachments.Count > 0 )
{
DimeAttachment attachment = context.Attachments[ attachmentID ];
if( attachment != null )
strm = attachment.Stream;
}
return strm;
}