mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
web: change offline mode api
This commit is contained in:
committed by
Abdullah Atta
parent
a4c0e8412b
commit
1b71edef45
@@ -564,6 +564,12 @@ async function exists(filename: string | FileHandle) {
|
||||
);
|
||||
}
|
||||
|
||||
async function bulkExists(filenames: string[]) {
|
||||
return Array.from(
|
||||
new Set(filenames).difference(new Set(await streamablefs.list())).values()
|
||||
);
|
||||
}
|
||||
|
||||
type FileMetadata = {
|
||||
key: SerializedKey;
|
||||
iv: string;
|
||||
@@ -666,7 +672,8 @@ export const FileStorage: IFileStorage = {
|
||||
exists,
|
||||
clearFileStorage,
|
||||
hashBase64,
|
||||
getUploadedFileSize
|
||||
getUploadedFileSize,
|
||||
bulkExists
|
||||
};
|
||||
|
||||
function isSuccessStatusCode(statusCode: number) {
|
||||
|
||||
Reference in New Issue
Block a user