Skip to content
Snippets Groups Projects
Commit 9829398b authored by Matheus Agio Nerone's avatar Matheus Agio Nerone
Browse files

fixing chuncks controller mime types validation


Signed-off-by: default avatarman13 <man13@inf.ufpr.br>
parent 0931e1e0
No related branches found
No related tags found
No related merge requests found
...@@ -113,7 +113,9 @@ class ChunksController < ApplicationController ...@@ -113,7 +113,9 @@ class ChunksController < ApplicationController
end end
def valid_mime_type? def valid_mime_type?
@learning_object.object_type.mime_types.map(&:extension).include? resumable_file_extension mime_types = @learning_object.object_type.mime_types.map(&:extension)
return true if mime_types.empty?
mime_types.include? resumable_file_extension
end end
# Never trust parameters from the scary internet, only allow the white list through. # Never trust parameters from the scary internet, only allow the white list through.
def chunks_params def chunks_params
......
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