@andersonalmeidax0/webcomponents 0.1.15 → 0.1.16

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 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.fileData)
156
- await uploadFile(vo.fileData);
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.fileData)
166
- await uploadFile(vo.fileData);
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(f) {
202
- var response=await fetch(urlAPI+'/api/download/'+f, {
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(f) => {
189
+ evtDownload = async(fname) => {
190
190
  alert(f)
191
191
  if(this.props.api) {
192
- var blob=await this.props.api.download(urlAPI+'/api/download/'+f)
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andersonalmeidax0/webcomponents",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "webcomponents",
5
5
  "main": "webcomponents",
6
6
  "scripts": {
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