Commit 8df0aee8 authored by eal's avatar eal

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

Detect file type if none given.

See merge request !62
parents 61c16193 286f6698
Pipeline #651 passed with stage
in 2 minutes and 40 seconds
...@@ -9,7 +9,7 @@ defmodule Pleroma.Upload do ...@@ -9,7 +9,7 @@ defmodule Pleroma.Upload do
File.cp!(file.path, result_file) File.cp!(file.path, result_file)
# fix content type on some image uploads # 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) get_content_type(file.path)
else else
file.content_type file.content_type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment