@plusscommunities/pluss-core-web 1.1.8 → 1.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-core-web",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "Core extension package for Pluss Communities platform",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {
@@ -150,13 +150,17 @@ class FileInputComponent extends Component {
150
150
  inputs: newInputs,
151
151
  });
152
152
  this.checkRefreshCallback(newInputs);
153
- try {
154
- let uploadFile = file;
155
- const url = await fileActions.uploadMediaAsync(uploadFile, uploadFile.name);
156
- this.checkSetDisplayValue(input, url);
157
- } catch (error) {
158
- console.log('handleFile error', error);
159
- this.setState({ uploadingFile: false });
153
+ if (this.props.handleFile) {
154
+ this.props.handleFile(file, newInputs);
155
+ } else {
156
+ try {
157
+ let uploadFile = file;
158
+ const url = await fileActions.uploadMediaAsync(uploadFile, uploadFile.name);
159
+ this.checkSetDisplayValue(input, url);
160
+ } catch (error) {
161
+ console.log('handleFile error', error);
162
+ this.setState({ uploadingFile: false });
163
+ }
160
164
  }
161
165
  };
162
166