logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 8df0aee8896af6fa647d88a00e466353a2f70742
parent 61c16193decca80c4021039a674edb77c7bf6158
Author: eal <eal@waifu.club>
Date:   Mon,  5 Feb 2018 21:57:17 +0000

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

Detect file type if none given.

See merge request pleroma/pleroma!62

Diffstat:

Mlib/pleroma/upload.ex2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/pleroma/upload.ex b/lib/pleroma/upload.ex @@ -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