Sha256: 047910df3a0dadfe58d9ce92f4d2934c5654d0e5e6eb180123ea0b24928638a0
Contents?: true
Size: 527 Bytes
Versions: 3
Compression:
Stored size: 527 Bytes
Contents
class WcmsComponents::EmbeddedImagesController < ApplicationController skip_after_action :verify_authorized skip_after_action :verify_policy_scoped def create # Anyone who is logged in should be able to access this. @embedded_image = EmbeddedImage.new file = params[:file] @embedded_image.upload = file if @embedded_image.save render json: { filelink: @embedded_image.upload.url } else render json: { error: true, messages: @embedded_image.errors.full_messages} end end end
Version data entries
3 entries across 3 versions & 1 rubygems