- Log in as a teacher and turn editing on in the course.
- Add a new Database activity.
- Create a file field and set the maximum size to the site or course upload limit.
- Create a picture field, also setting the maximum size.
- In the templates tab, save the single and list templates.
- Log in as a student and access the Database activity.
- Add an entry to the database and for both file and picture fields:
- Click 'Add...' on the respective field.
- Verify that the file picker is displayed.
- Upload a file and then a picture.
- Click 'Save and view' and verify that the file or picture has been uploaded correctly.
- Try downloading the file or picture.
- QA-1770 - Try to upload unsupported files in the picture field, such as .exe, spreadsheets or any document that is not a picture.
- Verify that you are not able to upload non-image files to a picture field
- Log in as the teacher again, update the Database activity, and set the maximum size lower.
- Log in as the student again and check that the maximum file size is stated correctly on the add entry page.