Skip to content

Commit

Permalink
fix #65
Browse files Browse the repository at this point in the history
  • Loading branch information
shiningw committed May 31, 2022
1 parent 641ac43 commit a0321d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ export const Http = class {
}
upload(file: File) {
const fd = new FormData();
this.client = new XMLHttpRequest();
this.client.open(this.method, this.url, true);
this.setHeader('requesttoken', this.getToken())
this.setHeader('OCS-APIREQUEST', 'true')
let callback = this.handler;
this.client.onload = () => {
if (typeof callback === 'function')
Expand Down

0 comments on commit a0321d6

Please sign in to comment.