Hello,
The situation is like this.
Use azure blob storage. Since it is a private container, file control is performed using SAS tokens.
When preCacheing an address with a SAS token, I want to put document(FileProvider) in, but I don't know how to do it.
I am only looking for the information given.
Currently, it is called as below, but if you do this, the SAS Token changes every time, so it is not cached.
DocumentViewer.Document = FileProvider.Parse(urlWithSASToken);
And, I can't handle DocumentCacheInfo object to change to FileProvider.
var documentcacheInfo = new DocumentCache(azureBlobLocation).LoadCacheInfo(fileCache.Key);
I would like to know exact examples of cache and how to use it.
It's difficult to find because there are no hints or documents anywhere in the manual.
Finally,
// preCacheDocument
var fileProvider = FileProvider.Parse(urlWithSASToken);
var documentCache = new DocumentCache(_azureBlobLocation).PreCacheDocument(fileProvider);
// use DocumentViewer
var documentViewer = new DocumentViewer(webConfiguration);
documentViewer.InitializeOption(someOptions);
// I don't want to use this, I just want to use pre-cached information.
documentViewer.Document = FileProvider.Parse(urlWithSASToken);
// like this
documentViewer.Document = PreCachedInfo ?? FileProvider.Parse(urlWithSASToken);
Thank you.