Hi,
This really is of low importance, as I have pretty much completed the task of seeing to what affect I can put the MB API into use for our own custom needs, and it seems, after some trial-and-error, I can achieve the desired results (the MD will be pleased!).
However, one final thing before I feel it's completed, is that when using RetrieveFile_UNC, the unc path variable (Quoting api doc "path - the UNC netowrk destination path"), requires the filename to be in the path as well, and this means appending the file extension. Since the user can select the retrieval task, this is dependent on the task and therefore can't be easily assumed.
Now, I do believe parsing the primitives of the task will gain me access to the encoder type which requires some processing to obtain the file extension that encoder represents (albeit simple string parsing) however, this seems a little odd because the tasks have a property to add the file extension to the name.
Is there an alternative way? GetDownloadUNC seemed to offer no extra functionality.
A simple method is below to help demonstrate, note, the returning string will not have a file extension
public string RetrieveFileUNC(string assetID, MBTask task)
{
string unc = string.Format(
@\\ServerName\TransferFolderWS\MBTransform\{0}, assetID);
try
{
string jobID = mbs.RetrieveFile_UNC(assetID, -1, task.mID, null, unc,true);
//return unc;
return mbs.GetDownloadUNC(jobID);
}
catch (Exception ex)
{
System.Diagnostics.Trace.WriteLine(ex.Message);
return null;
}
}
returning unc achieves the same result as GetDownloadUNC.
I hope this is clear, and really is of low priority, but it would be good to get things right!
Thanks for your time,
Sky