Tutorial: Images

Course Schedule

This assignment may be completed individually or in team of at most 2. You can partner differently for each tutorial.

For this iteration of Chatter, we’ll add still and moving images to the app.

The course back-end server mada.eecs.umich.edu is not available for this tutorial.

Expected behavior

Posting a new chatt with image and/or video:

DISCLAIMER: the video demo shows you one aspect of the app’s behavior. It is not a substitute for the spec. If there are any discrepancies between the demo and the spec, please follow the spec. The spec is the single source of truth. If the spec is ambiguous, please consult the teaching staff for clarification.

Objectives

Front end:

Back end:

APIs and protocol handshakes

To support posting and retrieving image and/or video clip, we add two APIs to Chatter. The first is a modified getchatts API that accommodates image and video URLs:

Using this syntax:

url-endpoint
-> request: data sent to Server
<- response: data sent to Client

The protocol handshake consist of:

/getimages
-> HTTP GET {}
<- [ array of chatts with optional image and video URLs ] 200 OK

/postimages
-> HTTP POST <name, message, optional image, optional video> // multipart/form-data
<- {} 200 OK

Modified Chatter API data formats

As in the previous tutorials, the chatts retrieval API will send back all accumulated chatts in the form of a JSON array of string arrays. In addition to the three elements name, message, and timestamp, each string array now carries two additional elements holding the URLs where the image and video data are stored on the server. If there is no image or video URL, the corresponding value must be JSON NULL.

[
    ["uniqname0", "message0", "id0", "timestamp0", "imageurl0", "videourl0"],
    ["uniqname1", "message1", "id1", "timestamp1", "imageurl1", "videourl1"], 
    ... 
]

To post a chatt, the client sends a multipart/form-data with fields "username", "message", "image", and "video". Note that the first field’s key is "username", not just “name”. The value of each key is a string (not urls!). If a chatt carries no image and/or video, the key "image" and/or "video" may be omitted or their values may be set to the empty string ("") or null.

In terms of testing, unfortunately there’s no practical way to attach sample image and video without a working front end. Postman, or other REST API client, however, can play back images and videos retrieved with getimages.

Assignment specs

You must first upgrade one of the alternative back-end servers:

then one of the front ends:


Prepared for EECS 441 by Sugih Jamin Last updated: February 21st, 2026