Skip to content
Snippets Groups Projects
Commit 286f6698 authored by eal's avatar eal
Browse files

Detect file type if none given.

parent 61c16193
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment