Skip to content

Commit

Permalink
[base] Add file size field to asset types (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars authored and bjoerge committed Oct 12, 2017
1 parent 8b7e61a commit f94dd23
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/@sanity/base/src/schema/types/fileAsset.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ export default {
type: 'string',
title: 'Label'
},
{
name: 'size',
type: 'number',
title: 'File size in bytes',
readOnly: true,
fieldset: 'system',
},
{
name: 'assetId',
type: 'string',
Expand Down
7 changes: 7 additions & 0 deletions packages/@sanity/base/src/schema/types/imageAsset.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ export default {
type: 'string',
title: 'Label'
},
{
name: 'size',
type: 'number',
title: 'File size in bytes',
readOnly: true,
fieldset: 'system',
},
{
name: 'assetId',
type: 'string',
Expand Down

0 comments on commit f94dd23

Please sign in to comment.