Task C: Uploading Pictures

Once again, our workflow consists of two parts. We have to implement the service operation that handles file uploads, and then we have to provide the UI for the user to upload the file. In addition to saving the file, it would also be nice to generate a thumbnail for it. This allows us to show image previews on the gallery page without having to retrieve full-sized images. The files will be stored in the database and associated with their owner via the username.

We’ll start by implementing the server workflow and then testing it using the Swagger UI page. Once it’s working the way we need, we can turn our attention to implementing the client side of the workflow.

Updating the Model

We need to update our database ...

Get Web Development with Clojure, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.