forked from External/greenlight
GRN2-xx: Allowed file types now matches BigBlueButton (#1966)
* Allowed file types now matches BigBlueButton * Uppercased file types are now allowed * Rubocop
This commit is contained in:
@ -418,7 +418,8 @@ class RoomsController < ApplicationController
|
||||
|
||||
# Checks if the file extension is allowed
|
||||
def valid_file_type
|
||||
Rails.configuration.allowed_file_types.split(",").include?(File.extname(room_params[:presentation].original_filename))
|
||||
Rails.configuration.allowed_file_types.split(",")
|
||||
.include?(File.extname(room_params[:presentation].original_filename.downcase))
|
||||
end
|
||||
|
||||
# Gets the room setting based on the option set in the room configuration
|
||||
|
@ -34,7 +34,7 @@
|
||||
<p id="invalid-file-type" class="text-danger"><%= t("modal.preupload.invalid") %></p>
|
||||
<div class="input-group mb-3">
|
||||
<div class="custom-file text-left">
|
||||
<%= f.label :presentation, t("modal.preupload.choose", type: allowed_file_types), id:"presentation-upload-label", class: "custom-file-label", "data-placeholder": t("modal.preupload.choose", type: allowed_file_types) %>
|
||||
<%= f.label :presentation, t("modal.preupload.choose"), id:"presentation-upload-label", class: "custom-file-label", "data-placeholder": t("modal.preupload.choose", type: allowed_file_types) %>
|
||||
<%= f.file_field :presentation, id: "presentation-upload", class: "custom-file-input cursor-pointer", accept: allowed_file_types, required: "true" %>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user