Class: Attachinary::FilesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/attachinary/files_controller.rb

Instance Method Summary collapse

Instance Method Details

#callbackObject



5
6
7
8
9
10
11
12
13
# File 'app/controllers/attachinary/files_controller.rb', line 5

def callback
  success = valid_cloudinary_response?
  if success && !params[:error].present?
    @file = File.create(file_params)
    respond_with @file
  else
    render nothing: true, status: 400
  end
end