Class: GitLfsS3::UploadService::UploadRequired
- Inherits:
-
Base
- Object
- Base
- GitLfsS3::UploadService::UploadRequired
show all
- Defined in:
- lib/git-lfs-s3/services/upload/upload_required.rb
Instance Attribute Summary
Attributes inherited from Base
#object, #req
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Methods included from AwsHelpers
#aws_access_key_id, #aws_region, #aws_secret_access_key, #bucket, #bucket_name, #object_data, #s3
Class Method Details
.should_handle?(req, object) ⇒ Boolean
8
9
10
|
# File 'lib/git-lfs-s3/services/upload/upload_required.rb', line 8
def self.should_handle?(req, object)
!object.exists? || object.size != req['size']
end
|
Instance Method Details
#response ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/git-lfs-s3/services/upload/upload_required.rb', line 12
def response
{
'_links' => {
'upload' => {
'href' => upload_destination,
'header' =>
},
'verify' => {
'href' => File.join(server_url, 'verify')
}
}
}
end
|
#status ⇒ Object
26
27
28
|
# File 'lib/git-lfs-s3/services/upload/upload_required.rb', line 26
def status
202
end
|