ex_aws_s3
ex_aws_s3 copied to clipboard
Download to memory (without streaming)
- Do not use the issues tracker for help or support (try Elixir Forum, Slack, IRC, etc.)
- Questions about how to contribute are fine.
Environment
- Elixir & Erlang versions (elixir --version): Elixir 1.16.0
Current behavior
Currently you can download some S3 file data into memory by doing this:
ExAws.S3.download_file("example-bucket", "path/to/file.txt", :memory) |> ExAws.stream!()
But this does not work
ExAws.S3.download_file("example-bucket", "path/to/file.txt", :memory) |> ExAws.request()
you get:
** (FunctionClauseError) no function clause matching in IO.chardata_to_string/1
(elixir 1.16.0) lib/io.ex:687: IO.chardata_to_string(:memory)
Is there anyway to download the file contents into a binary in memory?