You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
fetchblob
This commit is contained in:
@@ -85,15 +85,21 @@ class FileApiDriverOneDrive {
|
||||
}
|
||||
}
|
||||
|
||||
async get(path) {
|
||||
let content = null;
|
||||
async get(path, options = null) {
|
||||
if (!options) options = {};
|
||||
|
||||
try {
|
||||
content = await this.api_.execText('GET', this.makePath_(path) + ':/content');
|
||||
if (options.target == 'file') {
|
||||
let response = await this.api_.exec('GET', this.makePath_(path) + ':/content', null, null, options);
|
||||
return response;
|
||||
} else {
|
||||
let content = await this.api_.execText('GET', this.makePath_(path) + ':/content');
|
||||
return content;
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.code == 'itemNotFound') return null;
|
||||
throw error;
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
async mkdir(path) {
|
||||
|
||||
Reference in New Issue
Block a user