Add granularity of 'max size upload' for file upload

This commit is contained in:
REDDY PRASAD 2019-02-20 11:12:23 +05:30
parent c50a586418
commit 7c77cb985f
2 changed files with 2 additions and 1 deletions

View File

@ -72,6 +72,7 @@ class EditForm extends React.Component {
name="sizeLimit"
onChange={this.props.onChange}
type="number"
step="0.01"
value={get(this.props.modifiedData, 'sizeLimit', 1) / 1000}
/>
</div>

View File

@ -40,7 +40,7 @@ export function onCancel() {
export function onChange({ target }) {
const keys = ['modifiedData'].concat(target.name.split('.'));
const value = target.name === 'sizeLimit' ? parseInt(target.value, 10) * 1000 : target.value;
const value = target.name === 'sizeLimit' ? Number(target.value) * 1000 : target.value;
return {
type: ON_CHANGE,