When serving the image, only load its data

This commit is contained in:
Claudio Ortolina
2024-09-16 14:47:13 +01:00
parent 74e7d27ba4
commit cb8b42aad6
@@ -6,7 +6,7 @@ defmodule MusicLibraryWeb.ImageController do
def show(conn, %{"record_id" => record_id}) do
# TODO: better error handling
# TODO: serve correct caching headers
{:ok, image_data} = Records.get_image!(record_id)
image_data = Records.get_image!(record_id)
if image_data do
conn