class GitLfsS3::UploadService::ObjectExists

Public Class Methods

should_handle?(req, object) click to toggle source
# File lib/git-lfs-s3/services/upload/object_exists.rb, line 6
def self.should_handle?(req, object)
  object.exists? && object.size == req['size']
end

Public Instance Methods

response() click to toggle source
# File lib/git-lfs-s3/services/upload/object_exists.rb, line 10
def response
  {
    '_links' => {
      'download' => {
        'href' => object.presigned_url(:get, expires_in: 86_400)
      }
    }
  }
end
status() click to toggle source
# File lib/git-lfs-s3/services/upload/object_exists.rb, line 20
def status
  200
end