mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 11:19:19 +00:00
Detect file type if none given.
This commit is contained in:
parent
61c16193de
commit
286f6698ee
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue