Commit 286f6698 authored by eal's avatar eal

Detect file type if none given.

parent 61c16193
Pipeline #638 passed with stage
in 2 minutes and 14 seconds
......@@ -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
......
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