diff --git a/app/iiif_print/image_tool_decorator.rb b/app/iiif_print/image_tool_decorator.rb new file mode 100644 index 00000000..5fa311ed --- /dev/null +++ b/app/iiif_print/image_tool_decorator.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# OVERRIDE IIIF Print v1.0.0 + +module IiifPrint + module ImageToolDecorator + # Add -ping option for efficiency + def im_identify + cmd = "identify -ping -format 'Geometry: %G\nDepth: %[bit-depth]\nColorspace: %[colorspace]\nAlpha: %A\nMIME type: %m\n' #{path}" + `#{cmd}`.lines + end + end +end + +IiifPrint::ImageTool.prepend(IiifPrint::ImageToolDecorator) diff --git a/app/mini_magick/image/info_decorator.rb b/app/mini_magick/image/info_decorator.rb new file mode 100644 index 00000000..f58d828c --- /dev/null +++ b/app/mini_magick/image/info_decorator.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# OVERRIDE MiniMagick v4.11.0 + +module MiniMagick + class Image + module InfoDecorator + def identify + MiniMagick::Tool::Identify.new do |builder| + yield builder if block_given? + builder << '-ping' + builder << path + end + end + end + end +end + +MiniMagick::Image::Info.prepend(MiniMagick::Image::InfoDecorator) diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index 73e212b9..2a192c78 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -43,6 +43,9 @@ extraVolumeMounts: &volMounts - name: uploads mountPath: /app/samvera/hyrax-webapp/public/branding subPath: public-branding + # - name: uploads + #mountPath: /app/samvera/hyrax-webapp/tmp/uploads + #subPath: uploads ingress: enabled: true diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml index 5f57bcf7..0037dba7 100644 --- a/ops/staging-deploy.tmpl.yaml +++ b/ops/staging-deploy.tmpl.yaml @@ -43,6 +43,9 @@ extraVolumeMounts: &volMounts - name: uploads mountPath: /app/samvera/hyrax-webapp/public/branding subPath: public-branding + - name: uploads + mountPath: /app/samvera/hyrax-webapp/tmp/uploads + subPath: uploads ingress: