Sha256: bd86988acf3958c05ad18951083d9c18aa96c4019514f9c546eaec74dc2e1df8

Contents?: true

Size: 736 Bytes

Versions: 24

Compression:

Stored size: 736 Bytes

Contents

class PrometheeController < ApplicationController
  # This is acceptable because the iframe is sandboxed
  skip_before_action :verify_authenticity_token, only: :preview

  def preview
    @data = params[:data]
    render 'preview', layout: params[:preview_layout] if params.include? :preview_layout
  end

  def blob_create
    io = params[:file].to_io
    filename = params[:file].original_filename
    content_type = params[:file].content_type
    blob = ActiveStorage::Blob.create_after_upload! io: io, filename: filename, content_type: content_type
    render json: { id: blob.id, name: filename }
  end

  def blob_show
    blob = ActiveStorage::Blob.find params[:id]
    redirect_to url_for(blob.variant(resize: '720'))
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
promethee-1.6.14 app/controllers/promethee_controller.rb
promethee-1.6.13 app/controllers/promethee_controller.rb
promethee-1.6.12 app/controllers/promethee_controller.rb
promethee-1.6.11 app/controllers/promethee_controller.rb
promethee-1.6.10 app/controllers/promethee_controller.rb
promethee-1.6.8 app/controllers/promethee_controller.rb
promethee-1.6.7 app/controllers/promethee_controller.rb
promethee-1.6.6 app/controllers/promethee_controller.rb
promethee-1.6.5 app/controllers/promethee_controller.rb
promethee-1.6.4 app/controllers/promethee_controller.rb
promethee-1.6.3 app/controllers/promethee_controller.rb
promethee-1.6.2 app/controllers/promethee_controller.rb
promethee-1.6.1 app/controllers/promethee_controller.rb
promethee-1.6.0 app/controllers/promethee_controller.rb
promethee-1.5.4 app/controllers/promethee_controller.rb
promethee-1.5.3 app/controllers/promethee_controller.rb
promethee-1.5.2 app/controllers/promethee_controller.rb
promethee-1.5.0 app/controllers/promethee_controller.rb
promethee-1.4.29 app/controllers/promethee_controller.rb
promethee-1.4.28 app/controllers/promethee_controller.rb