fix #65
This commit is contained in:
@@ -147,7 +147,10 @@ export const Http = class {
|
|||||||
}
|
}
|
||||||
upload(file: File) {
|
upload(file: File) {
|
||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
|
this.client = new XMLHttpRequest();
|
||||||
this.client.open(this.method, this.url, true);
|
this.client.open(this.method, this.url, true);
|
||||||
|
this.setHeader('requesttoken', this.getToken())
|
||||||
|
this.setHeader('OCS-APIREQUEST', 'true')
|
||||||
let callback = this.handler;
|
let callback = this.handler;
|
||||||
this.client.onload = () => {
|
this.client.onload = () => {
|
||||||
if (typeof callback === 'function')
|
if (typeof callback === 'function')
|
||||||
|
|||||||
Reference in New Issue
Block a user