mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 07:26:15 +08:00
Merge pull request #7477 from artoscinote/ma_SCI_10638
Add missing file extension downcasing for WOPI [SCI-10638]
This commit is contained in:
commit
2ea19c2875
|
@ -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 = ''
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue