I successfully managed to do an S3 upload in a bucket, using File.Select to pick a File, getting a presigned URL from the backend and then uploading it to S3. My application will support upload of pretty large file and the next step would be to implement a multipart upload. I was thinking of making a port and in JS to slice the file, make e request to the backend for each chunk and then uploading them through JS as well. One additional issue that i have is that FIle.Select is used on a button so i don’t have a real way to pass the file in JS because i have no input that i can get by ID. What would be the best approach to the multipart upload and the file passing?
I’ve been doing this for a long time passing the File from drop/input Event as a Value through a port, then using Evaporate.js to do the actual upload (at the time the AWS lib was way too big for frontend, but it seems to be better nowadays). Then I use another port the other way to send back the progress and all.
Hey, thanks for the answer. I just looked at Evaporate.js, looks great but will it work with presigned URLs? and also in their example they are using crypto which will not work in my js file in ELM.