As a sysadmin, I do not want the pictures to be large ( 64kb). - CMPUT301F14T06/Team06MapleSyrup GitHub Wiki
Use Case: System administrator want the pictures to be small (64kb)
Use Case Name: RestrictPictureSize
Participating Actors: System Administrator
Goal: All pictures will be restricted below 64kb, before uploading.
Trigger: when users choose a picture and try to upload it
Precondition: The users have logged in, enter the question/answer create activity, and choose a picture
Postcondition: (condition 1) If the picture size is smaller or equal to 64kb, then uploading is successful and the picture will be stored; (condition 2) If the picture size is larger or equal to 64kb, then uploading is unsuccessful and the picture will not be stored;
Basic Flow:
1. The user chooses a picture from the gallary or from camera, then upload those objects.
2. The app goes backs to the creating activity, and displays uploaded pictures on the position under the edit question/answer content view, if the pictures's sizes are below 64kb.
3. If the picture's sizes are larger than 64kb, the app goes back to creating activity and toast a text "The picture size is larger than 64kb.",
4. Author can reload picture by click the add picture button/take photo button again or the user click "cancel" to stop authring question/answer.
Exceptions:
1.0 The uploaded object is not a picture, and smaller than 64kb
- 1.1 System return to the question edit window and displays the exception, "You can only attach pictures."
Test:
- the apps shows the currently Questions to the main page.
- Upload a picture larger than 64kb.
- Does the system stops attaching this picture and show a warning?
- Upload a picture Smaller than 64kb.
- Are the picture correctly displayed?
Constraints: User has picture or has toke a picture with camera.