Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multipart artifact uploads #706

Open
ezekg opened this issue Apr 13, 2023 · 0 comments
Open

Add support for multipart artifact uploads #706

ezekg opened this issue Apr 13, 2023 · 0 comments

Comments

@ezekg
Copy link
Member

ezekg commented Apr 13, 2023

This would remove the 5GB artifact size limit we currently have. This would need to be implemented as a flag during upload, e.g. meta.multipart, because the process is entirely different than when using a singular presigned upload URL. Artifact-related jobs would also need to be adjusted.

Originally posted by @dnewkerk in aws/aws-sdk-js#468 (comment):

@andrewgoodchild apologies if I was unclear, though on my end presigned multipart uploads are working. The gist you mentioned was me sharing with trevor how I had previously coded the authorization header before getting presigned multipart uploads working.

This is my new version of the (ruby) code that works for getting presigned urls for both single and multipart uploads. Hopefully seeing this will give you ideas for how to solve it similarly in your code:

presigner = Aws::S3::Presigner.new
if upload.multipart?
  presigner.presigned_url(:upload_part, bucket: upload.bucket, key: upload.filename,
    upload_id: upload.multipart_id, part_number: upload_part.part_number)
else
  presigner.presigned_url(:put_object, bucket: upload.bucket, key: upload.filename)
end

Notice how the first parameter of the presigned_url method is different between single and multipart uploads, and that multipart uploads take the regular key (filename) just like single part uploads, but also add parameters for setting the upload_id and part_number.

Hope this helps :)

Ref keygen-sh/keygen-cli#6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant