mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
✨ Add granularity of 'max size upload' for file upload
This commit is contained in:
parent
c50a586418
commit
7c77cb985f
@ -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>
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user