Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
8df0aee8
Commit
8df0aee8
authored
Feb 05, 2018
by
eal
Browse files
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/upload.ex
View file @
8df0aee8
...
...
@@ -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
get_content_type
(
file
.
path
)
else
file
.
content_type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment