Menu

1 / 3

Who Tells My Laravel App That a File Was Uploaded to S3 (When the Browser Leaves Before Delivering the Message)

DEV Community: laravel·Hermann D. Schimpf·6 days ago
#KESYcHxN
#devtolaravel#devto#dev#l68#using
Reading 0:00
15s threshold

Versión en español aquí .

So far in this series, we've laid the groundwork piece by piece. In chapter 3 , we made files travel directly from the browser to S3 using pre-signed URLs; and in chapter 4 , we configured SQS and a Lambda to process jobs in the background. But if the file never passes through our application, one question remains:

Who tells Laravel that a file has finished uploading so it can enqueue that job?

I have to confess something: until now, the browser was the one doing the notifying in my app. The actual flow has three phases: Laravel creates a signed upload URL and sends it to the browser; the browser sends the file directly to S3; and when it finishes, the browser itself makes a request to the app saying "I've uploaded it" so Laravel can enqueue the job. It works...…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.