1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-28 12:15:05 +01:00

Merge branch 'fix/no-image-upload-filetype' into 'develop'

Detect file type if none given.

See merge request pleroma/pleroma!62
This commit is contained in:
eal 2018-02-05 21:57:17 +00:00
commit 8df0aee889

View File

@ -9,7 +9,7 @@ defmodule Pleroma.Upload do
File.cp!(file.path, result_file)
# fix content type on some image uploads
content_type = if file.content_type == "application/octet-stream" do
content_type = if file.content_type in [nil, "application/octet-stream"] do
get_content_type(file.path)
else
file.content_type