mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-21 06:51:25 +08:00
Fix opening of wopi files with extensions written in upper case [SCI-10786]
This commit is contained in:
parent
eeaf073ced
commit
3733aa3b7e
1 changed files with 2 additions and 2 deletions
|
@ -245,7 +245,7 @@ class Asset < ApplicationRecord
|
|||
|
||||
def can_perform_action(action)
|
||||
if ENV['WOPI_ENABLED'] == 'true'
|
||||
file_ext = file_name.split('.').last
|
||||
file_ext = file_name.split('.').last&.downcase
|
||||
|
||||
if file_ext == 'wopitest' &&
|
||||
(!ENV['WOPI_TEST_ENABLED'] || ENV['WOPI_TEST_ENABLED'] == 'false')
|
||||
|
@ -297,7 +297,7 @@ class Asset < ApplicationRecord
|
|||
end
|
||||
|
||||
def favicon_url(action)
|
||||
file_ext = file_name.split('.').last
|
||||
file_ext = file_name.split('.').last&.downcase
|
||||
action = get_action(file_ext, action)
|
||||
action[:icon] if action[:icon]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue