Uploading Using the Documents Library

Summary

The Documents library supports uploading documents from the user drive to the cache system. This support comes handy when the cache is hosted on a separate machine not accessible to the user. For example, when the Documents class is hosted in a web service with a JavaScript or rich client application. Such as the HTML5/JavaScript version of the LEADTOOLS Document Viewer using the LEADTOOLS Documents Web Service.

There are two ways to upload a document to the cache system. The first, more "automatic" method is to provide the JavaScript File object to UploadFile, which returns a jQuery Promise for a string uri for the cached Document. The second way involves calling BeginUpload to first retrieve the uri, then successive calls to UploadDocument to upload chunks of a JavaScript File object manually. In both ways of uploading, the uri can be used with LoadFromUri to download the Document data.

Refer to UploadFile or UploadDocument for examples.

Help Version 20.0.2018.3.5
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS HTML5 JavaScript