Manage file categories
The primary function of file categories is to serve as a validation mechanism for file uploads. In other words, file categories help ensure that only certain types of files or files that meet specific criteria are allowed to be uploaded.
Each uploaded file belongs to a file category, which you can configure in ROQ Console. Go to the Configure Features ➔ File Categories menu.
File categories have two purposes:
- Fetch files by categories (e.g. get all avatars).
- Define the maximum file size of uploaded files.
If you create a new category, these input fields are required:
- Name: The name of the category.
- Key: The key for the category. You will use it when uploading the file.
- Max file Size: Maximum file size.
- Unit: You can choose MB for Megabyte or GB for Gigabyte.
This input field is Optional:
- Default visibility: You can also set the default file visibility.
There is no strict rule for the key naming system as long as it maintains consistency. For example, the key name
USER_FILES is a good illustration.