Set Content-Type to fixed value for all download actions

This commit is contained in:
Sebastian Serth
2022-10-05 21:46:17 +02:00
parent 42688ed1c9
commit f7515362a1
4 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ module CodeOcean
raise Pundit::NotAuthorizedError if @embed_options[:disable_download] || @file.filepath != params[:filename]
real_location = Pathname(@file.native_file.current_path).realpath
send_file(real_location, type: @file.native_file.content_type, filename: @file.name_with_extension, disposition: 'attachment')
send_file(real_location, type: 'application/octet-stream', filename: @file.name_with_extension, disposition: 'attachment')
end
def render_protected_upload