mirror of
https://github.com/algora-io/tv.git
synced 2024-11-26 01:00:20 +02:00
set proper content type for thumbnails
This commit is contained in:
parent
f6542c017b
commit
825cab8ee0
@ -376,7 +376,8 @@ defmodule Algora.Library do
|
|||||||
|
|
||||||
def store_thumbnail_from_file(%Video{} = video, src_path) do
|
def store_thumbnail_from_file(%Video{} = video, src_path) do
|
||||||
with {:ok, thumbnail} <- create_thumbnail_from_file(video, src_path),
|
with {:ok, thumbnail} <- create_thumbnail_from_file(video, src_path),
|
||||||
{:ok, _} <- Storage.upload(thumbnail, "#{video.uuid}/index.jpeg") do
|
{:ok, _} <-
|
||||||
|
Storage.upload(thumbnail, "#{video.uuid}/index.jpeg", content_type: "image/jpeg") do
|
||||||
video
|
video
|
||||||
|> change()
|
|> change()
|
||||||
|> put_change(:thumbnail_url, "#{video.url_root}/index.jpeg")
|
|> put_change(:thumbnail_url, "#{video.url_root}/index.jpeg")
|
||||||
|
Loading…
Reference in New Issue
Block a user