Sha256: 97dd14b0bd79f5543397e347e89dbbc7c1a823770796d98ba8200208d87ff024
Contents?: true
Size: 758 Bytes
Versions: 33
Compression:
Stored size: 758 Bytes
Contents
module Spotlight # Handles requests to upload images for exhibit thumbnails class FeaturedImagesController < Spotlight::ApplicationController load_and_authorize_resource instance_name: :featured_image def create if @featured_image.save && @featured_image.file_present? render json: { tilesource: tilesource, id: @featured_image.id } else render json: { error: 'unable to create image' }, status: :bad_request end end private def tilesource riiif.info_url(@featured_image.id) end # The create action can be called from a number of different forms, so # we normalize all the parameters. def create_params params.require(:featured_image).permit(:image) end end end
Version data entries
33 entries across 33 versions & 1 rubygems