10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'app/controllers/concerns/mobile_workflow/s3_storable.rb', line 10
def binary_urls(object)
return unless params[:binaries]
params[:binaries].map do |binary|
identifier = binary[:identifier]
key = binary[:key]
extension = binary[:mimetype].split('/')[1] metadata = binary[:metadata]
{
identifier: identifier,
url: presigned_url(
"#{object.class.name.underscore}/#{object.id}/#{key}/#{s3_object_uuid}.#{extension}", metadata: metadata
),
method: 'PUT'
}
end
end
|