diff options
author | eal <eal@waifu.club> | 2018-02-05 21:57:17 +0000 |
---|---|---|
committer | eal <eal@waifu.club> | 2018-02-05 21:57:17 +0000 |
commit | 8df0aee8896af6fa647d88a00e466353a2f70742 (patch) | |
tree | f70ea2c6344784cf57ef4e97ee23b281f0faa9b0 | |
parent | 61c16193decca80c4021039a674edb77c7bf6158 (diff) | |
parent | 286f6698eee9127928ce945e73be2e1059ba4e81 (diff) | |
download | pleroma-8df0aee8896af6fa647d88a00e466353a2f70742.tar.gz pleroma-8df0aee8896af6fa647d88a00e466353a2f70742.zip |
Merge branch 'fix/no-image-upload-filetype' into 'develop'
Detect file type if none given.
See merge request pleroma/pleroma!62
-rw-r--r-- | lib/pleroma/upload.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/upload.ex b/lib/pleroma/upload.ex index 3567c6c88..c41617c68 100644 --- 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 |