@andersonalmeidax0/webcomponents 0.1.15 → 0.1.17
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 +6 -6
- package/jzcomponents/XTableRead.jsx +3 -3
- package/package.json +1 -1
- package/releasenotes.txt +2 -0
package/RestAPIAdapter.js
CHANGED
|
@@ -152,8 +152,8 @@ 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.
|
|
156
|
-
await uploadFile(vo.
|
|
155
|
+
if(vo.filedata)
|
|
156
|
+
await this.uploadFile(vo.filedata);
|
|
157
157
|
return r;
|
|
158
158
|
|
|
159
159
|
}
|
|
@@ -162,8 +162,8 @@ 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.
|
|
166
|
-
await uploadFile(vo.
|
|
165
|
+
if(vo.filedata)
|
|
166
|
+
await this.uploadFile(vo.filedata);
|
|
167
167
|
return r[respBlock];
|
|
168
168
|
}
|
|
169
169
|
throw new PlatAPIError('Invalid payload response');
|
|
@@ -198,8 +198,8 @@ X-Colocar o MetalMarlek em outro server AWS ... com docker... com outra conta de
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
|
|
201
|
-
async downloadFile(
|
|
202
|
-
var response=await fetch(urlAPI+'/api/download/'+
|
|
201
|
+
async downloadFile(fname) {
|
|
202
|
+
var response=await fetch(urlAPI+'/api/download/'+fname, {
|
|
203
203
|
method: 'GET'
|
|
204
204
|
})
|
|
205
205
|
if (!response.ok) {
|
|
@@ -186,10 +186,10 @@ class XTableCell extends React.Component {
|
|
|
186
186
|
this.props.notifyChangeFn();
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
evtDownload = async(
|
|
190
|
-
alert(
|
|
189
|
+
evtDownload = async(fname) => {
|
|
190
|
+
alert(fname)
|
|
191
191
|
if(this.props.api) {
|
|
192
|
-
var blob=await this.props.api.download(
|
|
192
|
+
var blob=await this.props.api.download(fname)
|
|
193
193
|
// 2. Create blob link to download
|
|
194
194
|
const url = window.URL.createObjectURL(new Blob([blob]));
|
|
195
195
|
const link = document.createElement('a');
|
package/package.json
CHANGED
package/releasenotes.txt
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
0.1.13: new form type: "f"=file upload (Part 1: UI CREATE)
|
|
14
14
|
0.1.14: RestAPIAdapter => (Part 2: CREATE: file upload REST API / Part3: show fileField on list with download link
|
|
15
15
|
0.1.15: fix bug
|
|
16
|
+
0.1.16: fix bug2
|
|
17
|
+
|
|
16
18
|
npm login
|
|
17
19
|
npm publish --access public
|
|
18
20
|
|