Commit 286f6698 authored by eal's avatar eal
Browse files

Detect file type if none given.

parent 61c16193
Pipeline #638 passed with stage
in 2 minutes and 14 seconds
......@@ -9,7 +9,7 @@ def store(%Plug.Upload{} = file) 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
Supports Markdown
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