Tutorial: Images

DUE Wed, 11/5, 2 pm

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 backend 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

Frontend:

Backend:

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 <username, message, optional image, optional video> // multipart/form-data
<- {} 200 OK

Modified Chatter API data formats

As in the previous lab, 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 "username", "message", and "timestamp", each string array now carries two additional elements which are 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.

[
    ["username0", "message0", "id0", "timestamp0", "imageurl0", "videourl0"],
    ["username1", "message1", "id1", "timestamp1", "imageurl1", "videourl1"], 
    ... 
]

To post a chatt, the client sends a multipart/form-data with fields "username", "message", "image", and "video". The value of each key is a string (not urls!). If a chatt carries no image and/or video, since we’re using multipart/form-data encoding instead of JSON, 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 frontend. 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: August 29th, 2025