beginUpload Method

Summary

Gets a uri on the cache to upload a document.

Syntax

JavaScript Syntax
beginUpload = function(documentId) 
TypeScript Syntax
static beginUpload(documentId: string): JQueryPromise<string>; 

Parameters

documentId

Optional: The ID to be used with the loaded document.

Return Value

A Promise object that may resolve successfully to a string object containing the result URI that can be used with UploadDocument to upload a document.

Remarks

When the value of documentId is null (the default), then the document factory will create a new unique ID using a GUID generator. If the value is not null, then it is assumed to be a user-defined ID and used as is. In either case, the value is set in the Document.DocumentId property of the newly created document.

User-defined IDs can be used when the system already have unique ID's associated with the documents to be viewer. The document factory will not check nor guarantee the uniqueness of these IDs.

BeginUpload returns a Promise for a uri that the application may use to upload a JavaScript File object with UploadDocument. BeginUpload, UploadDocument, and AbortUploadDocument are used together to get the same functionality as UploadFile, giving more control over the upload process.

Refer to Uploading Using LEADTOOLS Documents Library for more information on how to use this method.

Example

Refer to UploadDocument for an example.

Requirements

Target Platforms

Help Version 19.0.2017.10.18
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Documents Assembly