app/controllers/ckpages/uploads_controller.rb
def create
      @upload = Upload.new(upload_params)
      #{"fileName":"image(13).png","uploaded":1,"url":"\/ckfinder\/userfiles\/files\/image(13).png","error":{"number":201,"message":"A file with the same name is already available. The uploaded file was renamed to \"image(13).png\"."}}

      @upload.save

      respond_to do |format|
        format.json {
          render plain: {fileName: @upload.file.filename, uploaded: 1, url: @upload.file.url}.to_json
        } 
      end
    end
def create
      @upload = Upload.new(upload_params)
      #{"fileName":"image(13).png","uploaded":1,"url":"\/ckfinder\/userfiles\/files\/image(13).png","error":{"number":201,"message":"A file with the same name is already available. The uploaded file was renamed to \"image(13).png\"."}}

      @upload.save

      respond_to do |format|
        format.json {
          render plain: {fileName: @upload.file.filename, uploaded: 1, url: @upload.file.url}.to_json
        } 
      end
    end
POST /uploads