@andersonalmeidax0/webcomponents 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RestAPIAdapter.js +4 -4
- package/package.json +1 -1
- package/releasenotes.txt +1 -0
package/RestAPIAdapter.js
CHANGED
|
@@ -176,7 +176,7 @@ class RestAPIAdapter {
|
|
|
176
176
|
*
|
|
177
177
|
*********************** */
|
|
178
178
|
async uploadFile(fileData) {
|
|
179
|
-
alert('UPLOAD start:' + this.urlServer + '/upload');
|
|
179
|
+
//alert('UPLOAD start:' + this.urlServer + '/upload');
|
|
180
180
|
let formData = new FormData();
|
|
181
181
|
formData.append('file', fileData);
|
|
182
182
|
const response = await fetch(this.urlServer + '/upload', {
|
|
@@ -192,15 +192,15 @@ class RestAPIAdapter {
|
|
|
192
192
|
throw new PlatAPIAuthError(`An error has occured: ${response.status}`);
|
|
193
193
|
throw new PlatAPIReturnCodeError();
|
|
194
194
|
}
|
|
195
|
-
alert("uploadfile vao ver r");
|
|
195
|
+
//alert("uploadfile vao ver r");
|
|
196
196
|
var r = await response.json();
|
|
197
|
-
alert("upload response:" + JSON.stringify(r));
|
|
197
|
+
//alert("upload response:" + JSON.stringify(r));
|
|
198
198
|
return r;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
|
|
202
202
|
async download(fname) {
|
|
203
|
-
alert('UPLOAD start:' + this.urlServer + '/download/' + fname);
|
|
203
|
+
//alert('UPLOAD start:' + this.urlServer + '/download/' + fname);
|
|
204
204
|
var response = await fetch(this.urlServer + '/download/' + fname, {
|
|
205
205
|
method: 'GET'
|
|
206
206
|
})
|
package/package.json
CHANGED