#1
Posted
:
Thursday, October 4, 2018 4:48:04 AM(UTC)
Groups: Registered
Posts: 29
Thanks: 3 times
After I download a file, I want to save it (blob or filestream) to cache similar to savetocache.
How can I do it without a viewer control?
#2
Posted
:
Monday, October 8, 2018 12:52:20 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 199
Was thanked: 28 time(s) in 28 post(s)
Hello,
Apologies for taking so long to get back to you. Could you elaborate on what you mean by "After I download a file"? Is this with regards to our HTML5 Document SDK or our .NET Document SDK? Any/all of the Document SDK (both HTML5 and .NET) functionality can be achieved without the use of the Document Viewer control. Generally this involves using commands from the DocumentFactory, or the LEADDocument its self.
Thanks,
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Tuesday, October 9, 2018 5:00:27 AM(UTC)
Groups: Registered
Posts: 29
Thanks: 3 times
HTML5Demos.DriveHelper.LTSharePoint.SharePointService.downloadFile(tempProperties, "file.pdf")
.done(function (base64) {
var data = lt.LTHelper.base64DecodeToByteArray(base64);
var byteArray = new Uint8Array(data);
var file = new HTML5Demos.DriveHelper.DriveFile(fileName[0]);
file.fileBlob = new Blob([byteArray]);
var args = new HTML5Demos.Dialogs.OpenFromDocumentStorageEventArgs();
args.documentFile = file;
args.loadEmbeddedAnnotations = false;
args.annotationsFile = null;
})
After I get the file into OpenFromDocumentStorageEventArgs, is it possible for to savetocache immediately?
Without the following commands?
_this.documentViewer.setDocument(document);
_documentId = document.documentId;
_this.documentViewer.prepareToSave();
var doc = _this.documentViewer.document;
lt.Document.DocumentFactory.saveToCache(doc)
.done(function () {
console.log('Document saved to cache with DocumentID: ' + _documentId);
})
.fail(function (jqXHR, statusText, errorThrown) {
alert("Document Viewer Error - See console for details.");
});
#4
Posted
:
Tuesday, October 9, 2018 8:01:14 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 199
Was thanked: 28 time(s) in 28 post(s)
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.