Sha256: 938a106b683b61523e463117d0c75e2d23990ba482c5db6657f36f8ee8841e76
Contents?: true
Size: 423 Bytes
Versions: 1
Compression:
Stored size: 423 Bytes
Contents
require_dependency "mo_page/application_controller" module MoPage class ImagesController < ApplicationController def create params.permit :imgFile, :localUrl, :dir, :authenticity_token image = Image.new(file: params[:imgFile]) if image.save render json: {'error' => 0, 'url' => image.file.url} else render json: {'error' => 1, 'message' => "error"} end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mo_page-0.0.2 | app/controllers/mo_page/images_controller.rb |