dtable-web-api
Advanced tools
Comparing version 1.0.49 to 1.0.50
{ | ||
"name": "dtable-web-api", | ||
"version": "1.0.49", | ||
"version": "1.0.50", | ||
"description": "an interface for dtable-web", | ||
@@ -5,0 +5,0 @@ "main": "lib/dtable-web-api.js", |
@@ -60,2 +60,13 @@ import axios from 'axios'; | ||
uploadFile(url, formData, onUploadProgress) { | ||
return axios.create()({ | ||
method: "post", | ||
data: formData, | ||
url: url, | ||
baseURL: this.server, | ||
headers: { 'Authorization': 'Token ' + this.token }, | ||
onUploadProgress: onUploadProgress, | ||
}) | ||
} | ||
uploadImage (uploadLink, formData, onUploadProgress = null) { | ||
@@ -393,3 +404,3 @@ return ( | ||
let url = this.server + '/api/v2.1/workspace/' + workspaceID + '/dtable/' + encodeURIComponent(dtableName) + '/plugins/'; | ||
return this._sendPostRequest(url, formData); | ||
return this.uploadFile(url, formData, onUploadProgress); | ||
} | ||
@@ -396,0 +407,0 @@ |
Sorry, the diff of this file is too big to display
120661
3271