Phoenix LIveview - Uploads - CORS Error when using with Digital Ocean Spaces

Hello all!

As I was trying around with Image Uploads I noticed, that when using the logic provided by Chris
(shown in this video: https://www.youtube.com/watch?v=PffpT2eslH8) together with the AWS compatible Digital Ocean Spaces API, I am always getting an CORS error.

When sending API requests to the Digital Ocean Spaces API from within the server, I do not have any problems.

I guess this API is one of these many, where you can specify Origin URLs as much as you want, they restrict requests coming from the client.

Using exAWS on the server, it works problem-free.

But there is the difficulty, that I am not quite sure how to properly get the generated Image BLOBs into my exAWS module with clean code.

So my question is, did some of you folks already use Digital Ocean Spaces with the “Image Uploads Deep Dive” by Chris, or has another workaround for that?

Maybe tips/tricks for not getting the CORS error (while of course specifying the Cors Origin URL in Digital Ocean Spaces Settings) …

Or a workaround for LIVE Uploads with ExAws? I could only come to a solution with using a non “live_input”…

Many Thanks in Advance,
Franz from rainy Germany :slight_smile: :smiley: