class Uppy::S3Multipart::App::Router

Public Instance Methods

client_call(operation, **options) click to toggle source
# File lib/uppy/s3_multipart/app.rb, line 137
def client_call(operation, **options)
  client = opts[:client]

  overrides = opts[:options][operation] || {}
  overrides = overrides.call(request) if overrides.respond_to?(:call)

  options = options.merge(overrides)

  client.send(operation, **options)
end
error!(message, status: 400) click to toggle source
# File lib/uppy/s3_multipart/app.rb, line 156
def error!(message, status: 400)
  request.halt status, { error: message }
end
param!(name) click to toggle source
# File lib/uppy/s3_multipart/app.rb, line 148
def param!(name)
  value = request.params[name]

  error! "Missing \"#{name}\" parameter" if value.nil?

  value
end