Task D: Displaying Pictures
We now have all the pieces in place to start working on the gallery portion of the application. Each gallery consists of the images that the user uploaded to our server. Since the images can be large, we’d like instead to display the thumbnails that we generate for each image on the page. When clicked, a thumbnail will display the full-size picture.
Displaying a Gallery for a User
The first thing we need to do is write a query to select the names of the thumbnail files for a particular user and then send those to the client. The client can then create image links for each thumbnail that point to the actual image. We also have to write a function that retrieves the image from the database and serves it using the appropriate ...
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.