Skip to content

Commit ed4fcb0

Browse files
committed
Fix size property on file upload widget.
1 parent 4b16fc2 commit ed4fcb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

frontend/packages/volto-form-block/src/components/Wrappers/FileWrapper.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const FileWrapper = (props) => {
6161
encoding: fields[2],
6262
'content-type': fields[1],
6363
filename: file.name,
64+
size: file.size,
6465
});
6566
});
6667
}}
@@ -89,5 +90,5 @@ FileWrapper.propTypes = {
8990
onEdit: PropTypes.func,
9091
onDelete: PropTypes.func,
9192
accept: PropTypes.string,
92-
size: PropTypes.number,
93+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
9394
};

0 commit comments

Comments
 (0)