projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61c1619
)
Detect file type if none given.
author
eal
<eal@waifu.club>
Sun, 4 Feb 2018 13:14:08 +0000
(15:14 +0200)
committer
eal
<eal@waifu.club>
Sun, 4 Feb 2018 13:22:30 +0000
(15:22 +0200)
lib/pleroma/upload.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/upload.ex
b/lib/pleroma/upload.ex
index 3567c6c8893388c76e8a90d4c3a2136375ac6785..c41617c68e80fe4130f5d24a2990e7c93f216622 100644
(file)
--- 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