Sha256: 58bd845e51126a702af46463e8d8f720c71f252f67d9ac9063884d37dc064925
Contents?: true
Size: 411 Bytes
Versions: 4
Compression:
Stored size: 411 Bytes
Contents
class Cas::FileUploadsController < Cas::ApplicationController skip_before_action :authenticate_user! skip_before_filter :verify_authenticity_token def create file = params.fetch(:file) uploader = ::FileUploader.new(:store) uploaded_file = uploader.upload(file) url = uploaded_file.url(public: true, host: ENV.fetch("CDN_HOST", nil)) render json: { location: url } end end
Version data entries
4 entries across 4 versions & 1 rubygems