I am working on code that uploads video file(100MB ~ 300MB) to Amazon S3.
It takes quite some time. But I am not sure which elixir module or function I should use for concurrency.
I read some article about it but still don’t understand clearly.
And in the future, I need to code for uploading progress.
Which one do you recommend?
def upload_video_to_s3_async(path, username) do s3_filename = create_s3_filename(path, username) Task.async(fn -> path |> S3.Upload.stream_file() |> S3.upload(System.get_env("S3-Bucket-Name"), s3_filename) |> ExAws.request() end) end
Task, Task.Supervisor, spawn?
I need your help!