diff options
author | eal <eal@waifu.club> | 2018-02-04 15:14:08 +0200 |
---|---|---|
committer | eal <eal@waifu.club> | 2018-02-04 15:22:30 +0200 |
commit | 286f6698eee9127928ce945e73be2e1059ba4e81 (patch) | |
tree | f70ea2c6344784cf57ef4e97ee23b281f0faa9b0 /lib | |
parent | 61c16193decca80c4021039a674edb77c7bf6158 (diff) | |
download | pleroma-286f6698eee9127928ce945e73be2e1059ba4e81.tar.gz |
Detect file type if none given.
Diffstat (limited to 'lib')
-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 |