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

How to implement Chunked HTTP Uploads using ex_aws_s3 and UpChunk for AWS S3 Bucket #852

Open
patrickespake opened this issue Jan 13, 2022 · 0 comments

Comments

@patrickespake
Copy link

patrickespake commented Jan 13, 2022

Hi guys,

I am trying to implement chunked http uploads using ex_aws_s3 and UpChunk.

I am following the documentation: https://hexdocs.pm/phoenix_live_view/uploads-external.html#chunked-http-uploads

But I don’t know how to configure the method presign_upload to generate the aws s3 link with the upload id using ex_aws_s3:

defp presign_upload(entry, socket) do
  {:ok, %{"Location" => link}} =
    SomeTube.start_session(%{
      "uploadType" => "resumable",
      "x-upload-content-length" => entry.client_size
    })

  {:ok, %{uploader: "UpChunk", entrypoint: link}, socket}
end

How can i generate the link to the entrypoint for uploading large files using ex_aws_s3 working with UpChunk?

I tried to find it on Google and in the ex_aws_s3 documentation but it is not clear in the documentation.

Thank you for the help.

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