aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2018-02-04 15:14:08 +0200
committereal <eal@waifu.club>2018-02-04 15:22:30 +0200
commit286f6698eee9127928ce945e73be2e1059ba4e81 (patch)
treef70ea2c6344784cf57ef4e97ee23b281f0faa9b0 /lib
parent61c16193decca80c4021039a674edb77c7bf6158 (diff)
downloadpleroma-286f6698eee9127928ce945e73be2e1059ba4e81.tar.gz
Detect file type if none given.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/upload.ex2
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