Category: Laravel, Laravel, api, api

Amazon S3 ( Simple Storage Service) is a cloud storage facility that allows for the upload, storage and retrieval of data, including static websites, images and documents. Laravel provides drivers to easily connect and upload your data to Amazon S3, and we are going to see how.

When the store() method runs, a folder ‘user_documents’ will be created inside the s3 bucket (that we will specify in the .env file), and the folder will contain the file we uploaded.

This is what your bucket looks like: Now that the bucket is created, we need to set up access keys that our API will use to connect to our bucket.

Your s3 settings will look like this: If you do not want all the files uploaded to the S3 bucket to be accessible by default, instead of adding/updating the visibility setting of your s3 disk to public, you can do it on a per file basis.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners