@experium/findy-form 1.2.47 → 1.2.48

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.
@@ -183,8 +183,10 @@ var File = /*#__PURE__*/function (_Component) {
183
183
  var fileExtenstion = (0, _ramda.last)("".concat(file.name).split('.'));
184
184
  var fileType = file.type || (0, _ramda.path)([type, fileExtenstion], _allowFileExtensions.defaultAllowFileExtensions);
185
185
  var validFileType = (0, _validation.checkFileType)(type, file.type, fileExtenstion, allowFileExtensions);
186
+ file.type = fileType;
186
187
  fd.append('file', file);
187
188
  fd.append('name', file.name);
189
+ fd.append('mimetype', fileType);
188
190
 
189
191
  if (validFileType) {
190
192
  _this.setState({
@@ -451,7 +453,6 @@ var File = /*#__PURE__*/function (_Component) {
451
453
  className: styles.fileInput,
452
454
  id: name,
453
455
  type: "file",
454
- value: "",
455
456
  onChange: this.onChange,
456
457
  accept: this.getAccept(type),
457
458
  disabled: disabled || loading && !error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experium/findy-form",
3
- "version": "1.2.47",
3
+ "version": "1.2.48",
4
4
  "main": "./lib/index.js",
5
5
  "homepage": "https://experium.github.io/findy-form",
6
6
  "repository": "https://github.com/experium/findy-form",
@@ -60,8 +60,10 @@ class File extends Component {
60
60
  const fileType = file.type || path([type, fileExtenstion], defaultAllowFileExtensions);
61
61
  const validFileType = checkFileType(type, file.type, fileExtenstion, allowFileExtensions);
62
62
 
63
+ file.type = fileType;
63
64
  fd.append('file', file);
64
65
  fd.append('name', file.name);
66
+ fd.append('mimetype', fileType);
65
67
 
66
68
  if (validFileType) {
67
69
  this.setState({ loading: true, error: false });
@@ -302,7 +304,6 @@ class File extends Component {
302
304
  className={styles.fileInput}
303
305
  id={name}
304
306
  type='file'
305
- value=''
306
307
  onChange={this.onChange}
307
308
  accept={this.getAccept(type)}
308
309
  disabled={disabled || (loading && !error)}