Indicates whether the URL points to a special LEAD cache scheme.
public static bool IsUploadDocumentUri(
Uri uri
)
Public Shared Function IsUploadDocumentUri(
ByVal uri As System.Uri
) As Boolean
public:
static bool IsUploadDocumentUri(
System::Uri^ uri
)
public static boolean isUploadDocumentUri(URI uri)
uri
URI to check.
true if the URL points to a special LEAD cache scheme; otherwise, false.
This is a helper method that can be used to detect whether a URL was created by BeginUpload. The Document Library creates a URI in the following format for uploaded documents:
leadcache://documentID
For instance, for the document with ID 2E478C12F7B64B67883B76B4D2FBE612
the cache URI for it will be:
leadcache://2E478C12F7B64B67883B76B4D2FBE612
Use the IsLeadCacheScheme helper method to determine if a string value contains a valid LEAD cache URI. For example:
// A valid LEAD cache scheme with an ID
Assert.IsTrue(DocumentFactory.IsLeadCacheScheme("leadcache://2E478C12F7B64B67883B76B4D2FBE612"));
// An invalid LEAD cache scheme, not leadcache
Assert.IsFalse(DocumentFactory.IsLeadCacheScheme("http://2E478C12F7B64B67883B76B4D2FBE612"));
// Another invalid LEAD cache scheme, does not have a scheme
Assert.IsFalse(DocumentFactory.IsLeadCacheScheme("2E478C12F7B64B67883B76B4D2FBE612"));
Use the MakeLeadCacheUri helper method to construct a LEAD cache URI from a document ID. For example:
Uri documentCacheUri = DocumentFactory.MakeLeadCacheUri("2E478C12F7B64B67883B76B4D2FBE612");
Assert.AreEqual("leadcache://2E478C12F7B64B67883B76B4D2FBE612", documentCacheUri.ToString());
Use the GetLeadCacheData helper method to retrieve the document ID from a LEAD cache URI. For example:
Uri documentCacheUri = DocumentFactory.MakeLeadCacheUri("2E478C12F7B64B67883B76B4D2FBE612");
Assert.AreEqual("2E478C12F7B64B67883B76B4D2FBE612", DocumentFactory.GetLeadCacheData(documentCacheUri));
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document