1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Attach resource from mobile

This commit is contained in:
Laurent Cozic
2017-08-01 23:40:14 +02:00
parent 7fe70696bb
commit 19266206f4
14 changed files with 131 additions and 25 deletions

View File

@@ -126,11 +126,15 @@ class FileApiDriverOneDrive {
return this.makeItem_(item);
}
put(path, content) {
let options = {
headers: { 'Content-Type': 'text/plain' },
};
return this.api_.exec('PUT', this.makePath_(path) + ':/content', null, content, options);
put(path, content, options = null) {
if (!options) options = {};
if (options.source == 'file') {
return this.api_.exec('PUT', this.makePath_(path) + ':/content', null, null, options);
} else {
options.headers = { 'Content-Type': 'text/plain' };
return this.api_.exec('PUT', this.makePath_(path) + ':/content', null, content, options);
}
}
delete(path) {