Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def upload(photos) do
ext = Path.extname(upload.filename)
u = Ecto.UUID.generate
flnm = "#{u}#{ext}"
{:ok, file_binary} =
s3_bucket = "imagey-elixir"
{:ok, _} =
ExAws.S3.put_object(s3_bucket, flnm, file_binary)
|> ExAws.request()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.