Sha256: 8fd8bfc2b18486d87e179b073fbc13863c46777be995b04b96438eb412f802e5

Contents?: true

Size: 461 Bytes

Versions: 4

Compression:

Stored size: 461 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ReportingProposals
    module GalleryMethodsOverride
      extend ActiveSupport::Concern

      # this method cannot process direct uploads in gallery_methods.rb so we override it here with the fix
      included do
        def photos_content_type(photo)
          return blob(photos_signed_id(photo)).content_type if photo.is_a?(Hash)

          photo.content_type
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-reporting_proposals-0.6.0 app/commands/concerns/decidim/reporting_proposals/gallery_methods_override.rb
decidim-reporting_proposals-0.5.2 app/commands/concerns/decidim/reporting_proposals/gallery_methods_override.rb
decidim-reporting_proposals-0.5.1 app/commands/concerns/decidim/reporting_proposals/gallery_methods_override.rb
decidim-reporting_proposals-0.5.0 app/commands/concerns/decidim/reporting_proposals/gallery_methods_override.rb