diff --git a/Uploader.js b/Uploader.js index 3a5a15a..07be20e 100644 --- a/Uploader.js +++ b/Uploader.js @@ -32,8 +32,13 @@ class Uploader { fetch(this.url + "/" + tag, { method: "POST", - body: form + headers: { + ...this.client.api.auth.headers, + ...form.getHeaders() + }, + body: form, }).then(response => response.json()).then(json => { + if (!json.id) throw json; res(json.id); }); });