get
This commit is contained in:
@@ -172,9 +172,9 @@ class DownloadManagerImpl {
|
||||
if (!this.ready) {
|
||||
throw Error(CustomError.DOWNLOAD_MANAGER_NOT_READY);
|
||||
}
|
||||
const cachedThumb = await this.getCachedThumbnail(file.id);
|
||||
const cachedThumb = await this.thumbnailCache.get(`${file.id}`);
|
||||
if (cachedThumb) {
|
||||
return cachedThumb;
|
||||
return new Uint8Array(await cachedThumb.arrayBuffer());
|
||||
}
|
||||
if (localOnly) {
|
||||
return null;
|
||||
|
||||
@@ -110,6 +110,10 @@ export const openCache = async (
|
||||
*
|
||||
* Also note that a File is a Blob!
|
||||
*
|
||||
* To convert from a Blob to ArrayBuffer
|
||||
*
|
||||
* await blob.arrayBuffer()
|
||||
*
|
||||
* Refs:
|
||||
* - https://github.com/yigitunallar/arraybuffer-vs-blob
|
||||
* - https://stackoverflow.com/questions/11821096/what-is-the-difference-between-an-arraybuffer-and-a-blob
|
||||
|
||||
Reference in New Issue
Block a user