TwistingTwists

TwistingTwists

Phoenix LiveView Uploads with presigned urls

I am using presigned_url with PUT to upload to S3 via external url.

However a strange thing is happening.

  1. I can upload a .pdf / .mp4 / .bin format upto 15 Mb without any issue.
  2. any file close to 40MB has only 8MB size on S3 bucket even though the liveview’s handle_progress reports 100% upload.
  3. 50 MB file has roughly 17MB file size in S3.

the S3 backend is Cloudflare R2.
Edit: I can upload the files upto 2GB when using ExAws.put_object .

Due to this, when I try to download the same file via presigned url (GET), only 17MB is downloaded!

How to debug this issue?

Most Liked

TwistingTwists

TwistingTwists

so, one issue is preflight urls.

preflight_request - has the complete size = 39942663

preflight response - has chunk size = 1000000

and it appears to upload that first chunk only. (or maybe rewrites that over and over)

Where Next?

Popular in Questions Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42716 114
New

We're in Beta

About us Mission Statement