Skip to content

Commit

Permalink
Merge pull request #5042 from avalonmediasystem/filename_handling
Browse files Browse the repository at this point in the history
Bump ActiveEncode and update FileLocator
  • Loading branch information
cjcolvar authored Jan 30, 2023
2 parents 479cb00 + f87bc0d commit ba45979
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ gem 'omniauth-lti', git: "https://github.com/avalonmediasystem/omniauth-lti.git"
gem "omniauth-saml", "~> 2.0"

# Media Access & Transcoding
gem 'active_encode', '~> 1.0'
gem 'active_encode', '~> 1.0', '>= 1.1.2'
gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform'
gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.2-avalon'
gem 'fastimage'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ GEM
active_elastic_job (3.2.0)
aws-sdk-sqs (~> 1)
rails (>= 5.2.6, < 7.1)
active_encode (1.1.1)
active_encode (1.1.2)
addressable (~> 2.8)
rails
active_fedora-datastreams (0.4.0)
Expand Down Expand Up @@ -959,7 +959,7 @@ DEPENDENCIES
active-fedora (~> 13.2, >= 13.2.5)
active_annotations (~> 0.4)
active_elastic_job
active_encode (~> 1.0)
active_encode (~> 1.0, >= 1.1.2)
active_fedora-datastreams (~> 0.4)
activejob-traffic_control
activejob-uniqueness
Expand Down
8 changes: 4 additions & 4 deletions app/services/file_locator.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2011-2022, The Trustees of Indiana University and Northwestern
# University. Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
#
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
Expand All @@ -24,7 +24,7 @@ class S3File
def initialize(uri)
uri = Addressable::URI.parse(uri)
@bucket = Addressable::URI.unencode(uri.host)
@key = Addressable::URI.unencode(uri.path).sub(%r(^/*(.+)/*$),'\1')
@key = Addressable::URI.unencode(ActiveEncode.sanitize_uri(uri)).sub(%r(^/*(.+)/*$),'\1')
end

def object
Expand Down

0 comments on commit ba45979

Please sign in to comment.