Saving files to S3
With the previous recipe, I covered how to upload and save files. I will show how easy it is to get those onto S3. By the time we are done, we will have our files uploaded to S3 and when needed for testing our app will deal with the local switch for us. I will show this both at the upload level and the view level.
Getting ready
If you did the previous recipe, you will have the basic classes you need to make this happen. Also, you need to make an S3 bucket on AWS. I will cover this a bit but read more on their website, since doing this right is a skill and you should not be using your AWS key and AWS secret in your app. You should use a set made for the app; for a user you make just for this app.
How to do it…
- We need a bucket! Log ...
Get Laravel 5.x Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.