mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
fix: handle chunkSize
This commit is contained in:
@@ -8,11 +8,12 @@ export default class FileStorage {
|
||||
this._queue = [];
|
||||
}
|
||||
|
||||
async downloadFile(groupId, hash) {
|
||||
async downloadFile(groupId, hash, chunkSize) {
|
||||
const url = `${hosts.API_HOST}/s3?name=${hash}`;
|
||||
const token = await this.tokenManager.getAccessToken();
|
||||
const { execute, cancel } = this.fs.downloadFile(hash, {
|
||||
url,
|
||||
chunkSize,
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
});
|
||||
this._queue.push({ groupId, hash, cancel, type: "download" });
|
||||
|
||||
Reference in New Issue
Block a user