You are looking at the old Apostrophe 0.5 documentation. It is deprecated for new projects. Check out the latest version!

Making media fields mandatory

← Previous: Creating pages programmatically

When people upload files, it is possible to make the credit, description and tags fields mandatory.

To do so, just configure the files option in app.js:

files: {
  required: [ 'credit', 'tags' ]
}

Note that the title field is prepopulated with the filename if nothing better is provided.

Next: Adding file types in the media library →