Changes

Internal:Copy Document

771 bytes added, 09:03, 3 June 2015
Created page with "{{Internal/Coding/Basics}} === Copy a physical Document on a Cloud Storage === {{Internal/CodeSnippetInfo|KNO}} <syntaxhighlight lang="csharp"> UBIK.Document.DocumentClass d..."
{{Internal/Coding/Basics}}
=== Copy a physical Document on a Cloud Storage ===
{{Internal/CodeSnippetInfo|KNO}}

<syntaxhighlight lang="csharp">
UBIK.Document.DocumentClass docObj = <SomeDocumentObject>;

if (docObj != null)
{
string srcFullPath = docObj.DocumentFullPath();

// Fullpath of document set
if (!string.IsNullOrWhiteSpace(srcFullPath))
{
// Get CloudFileSystem from UBIKEnvironemnt
UBIK.Cloud.CloudFileSystem cfs = (UBIK.Cloud.CloudFileSystem)docObj.Environment.FileSystem;

if (cfs != null)
{
// Copy Document using CloudContainer class
cfs.CloudContainer.Upload("doc/kno/123.jpg", srcFullPath);
}
}
}
</syntaxhighlight>
10,686
edits