-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[schema] Fix wrong asset type names and use asset.originalFilename a…
…s default preview title for images (#235) * [schema] Fix wrong asset type names and use asset.originalFilename as default preview title for images * [base] Update schema definitions for assets * [base] Give the asset types better titles
- Loading branch information
Showing
6 changed files
with
114 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,60 @@ | ||
export default { | ||
name: 'fileAsset', | ||
title: 'File asset', | ||
name: 'sanity.fileAsset', | ||
title: 'File', | ||
type: 'object', | ||
fieldsets: [ | ||
{ | ||
name: 'system', | ||
title: 'System fields', | ||
description: 'These are read only' | ||
} | ||
], | ||
fields: [ | ||
{ | ||
name: 'assetId', | ||
name: 'originalFilename', | ||
type: 'string', | ||
title: 'Original file name' | ||
}, | ||
{ | ||
name: 'extension', | ||
type: 'string', | ||
title: 'Asset ID' | ||
title: 'File extension' | ||
}, | ||
{ | ||
name: 'project', | ||
name: 'mimeType', | ||
type: 'string', | ||
title: 'Project' | ||
title: 'Mime type' | ||
}, | ||
{ | ||
name: 'label', | ||
type: 'string', | ||
title: 'Label' | ||
}, | ||
{ | ||
name: 'assetId', | ||
type: 'string', | ||
title: 'Asset ID', | ||
readOnly: true, | ||
fieldset: 'system' | ||
}, | ||
{ | ||
name: 'path', | ||
type: 'string', | ||
title: 'Path' | ||
title: 'Path', | ||
readOnly: true, | ||
fieldset: 'system' | ||
}, | ||
{ | ||
name: 'url', | ||
type: 'string', | ||
title: 'Url' | ||
title: 'Url', | ||
readOnly: true, | ||
fieldset: 'system' | ||
} | ||
], | ||
preview: { | ||
select: { | ||
title: 'originalFilename' | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters