Hacker News new | ask | show | jobs
by erhaetherth 771 days ago
I tried to do the pre-signed URL thing but gave up quickly. I don't know how you'd do it properly. You're going to want a record of that in your database, right? So what, you have the client upload the image and then send a 2nd request to your server to tell you they uploaded it?

I ended up piping it through my server. I can limit file size, authenticate, insert it into my DB and do what not this way.

1 comments

Usually it’s the opposite order. Client requests an upload, an entry is made in the database and a pre signed url is generated and returned to the client. The client uploads the image. Optionally, the client could then tell the server the upload was completed, although I’ve never done that final step.