I don’t normally like asking for help with things because I prefer figuring them out myself, but I’m kind of stumped at the moment because I’m getting no feedback for my error from the terminal so I have no leads to go on.
For context I’ve been trying to figure out uploads to S3 for the last few days and have worked my way through Chris McCord’s upload video from a couple of years ago alongside External Uploads — Phoenix LiveView v0.18.11
Uploading locally to my “uploads” folder works fine, but when I add &presign_upload/2 to allow_uploads, every time I click the “save” button I just get the phx-disable error where it displays “Saving…” and does nothing. There’s no terminal output so I have no idea what I’m doing wrong.
I can still submit posts without images attached as well regardless of the presign. I should also add for additional context on my set up, I was able to upload files easily using ExAWS in the controller, so I know my bucket and config are set up. I’ve also updated the sha256 function on Chris’ simples3uplaod form.
So my question is:
What is the best way to deal with a form that just shows “Saving…” and nothing on the terminal? Logger and Inspect only seem to work when things are actually in motion, but I’m currently stuck it seems. The only way I can get a terminal output seems to be from intentionally breaking things to fault find them.
For example if I delete the region from my config in the presign_upload function it will throw an error saying its missing, so I know the function is at least being called. It’s kind of hard to fault find like this though
If there are any common causes for “saving…” or no terminal outputs, or anyways to easily fault find them advice would be aprreciated.
Also on a different note, is it impossible to use EXAWS.put_object in liveview? I find it really weird how easy it is to use in a controller, but how impossible I’ve been finding it in liveview
Thanks