Merge pull request #7477 from artoscinote/ma_SCI_10638

Add missing file extension downcasing for WOPI [SCI-10638]
This commit is contained in:
Martin Artnik 2024-04-16 09:33:53 +02:00 committed by GitHub
commit 2ea19c2875
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -213,7 +213,7 @@ module ApplicationHelper
# Check whether the wopi file can be edited and return appropriate response
def wopi_file_edit_button_status(asset)
file_ext = asset.file_name.split('.').last
file_ext = asset.file_name.split('.').last&.downcase
if Constants::WOPI_EDITABLE_FORMATS.include?(file_ext)
edit_supported = true
title = ''

View file

@ -324,7 +324,7 @@ class Asset < ApplicationRecord
end
def get_action_url(user, action, with_tokens = true)
file_ext = file_name.split('.').last
file_ext = file_name.split('.').last&.downcase
action = get_action(file_ext, action)
if !action.nil?
action_url = action[:urlsrc]