@andersonalmeidax0/webcomponents 0.1.18 → 0.1.20
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 +3 -3
- package/jzcomponents/XTableRead.jsx +1 -1
- package/package.json +1 -1
package/RestAPIAdapter.js
CHANGED
|
@@ -152,7 +152,7 @@ X-Colocar o MetalMarlek em outro server AWS ... com docker... com outra conta de
|
|
|
152
152
|
|
|
153
153
|
//tag de dados pode ser nada,result, data
|
|
154
154
|
if(this.tagData==null){
|
|
155
|
-
if(vo.filedata)
|
|
155
|
+
if(vo&&vo.filedata)
|
|
156
156
|
await this.uploadFile(vo.filedata);
|
|
157
157
|
return r;
|
|
158
158
|
|
|
@@ -162,7 +162,7 @@ X-Colocar o MetalMarlek em outro server AWS ... com docker... com outra conta de
|
|
|
162
162
|
if(r[respBlock])
|
|
163
163
|
r[respBlock].insertedId=r.insertedId;
|
|
164
164
|
if(r[respBlock]) {
|
|
165
|
-
if(vo.filedata)
|
|
165
|
+
if(vo&&vo.filedata)
|
|
166
166
|
await this.uploadFile(vo.filedata);
|
|
167
167
|
return r[respBlock];
|
|
168
168
|
}
|
|
@@ -198,7 +198,7 @@ X-Colocar o MetalMarlek em outro server AWS ... com docker... com outra conta de
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
|
|
201
|
-
async
|
|
201
|
+
async download(fname) {
|
|
202
202
|
var response=await fetch(urlAPI+'/api/download/'+fname, {
|
|
203
203
|
method: 'GET'
|
|
204
204
|
})
|
|
@@ -194,7 +194,7 @@ class XTableCell extends React.Component {
|
|
|
194
194
|
const url = window.URL.createObjectURL(new Blob([blob]));
|
|
195
195
|
const link = document.createElement('a');
|
|
196
196
|
link.href = url;
|
|
197
|
-
link.setAttribute('download', `${
|
|
197
|
+
link.setAttribute('download', `${fname}`);
|
|
198
198
|
// 3. Append to html page
|
|
199
199
|
document.body.appendChild(link);
|
|
200
200
|
// 4. Force download
|