In this video, Keith Casey wires up the middleware that will store our images in the cloud.
- [Voiceover] Let's build the S3 file mover.…This requires a little more effort.…So first, let's install the Amazon S3 library.…Which we can do through Composer.…We'll start this with 'composer require aws'.…We want the 'aws-sdk-php'.…We'll go ahead and install that.…Once again, Composer will resolve all…the dependencies for us,…and then install them,…along with all of the things we already have.…This could take a moment,…depending on your internet speed.…Once we have that,…we'll head back to file move.…
And now we can build it out.…First, we need to include the library that we want to use.…So it's 'use Aws\S3\S3Client'.…That'll give us access to everything in Amazon's S3,…with just a few lines of code.…Next, we'll want to set up the function to actually use it.…Say 'public static function move',…start with image path we've been using before,…and pass in the app, just in case we need it.…So now we need to set up our S3 client.…Say 'new S3Client',…and this takes a configuration array.…So we'll go ahead and set up a few parameters in here.…
This course begins with a simple application specification and builds it one step at a time. Each chapter includes a key concept, with examples from other public APIs, and then shows how to build it yourself with Silex. Learn about URL routing, validating input, and generating response codes and hypermedia payloads. Like any project, the first implementation may be a little messy, but don't worry. The last chapter covers refactoring and what it takes to scale and support the API going forward.
- Understanding the project goals
- Adding authentication with Silex
- Using cross-framework and authentication middleware
- Creating a read-write API in Silex
- Uploading files via an API
- Adding file security
- Creating payloads and response codes in Silex
- Scaling your API
Skill Level Beginner
PHP Date and Time Essential Trainingwith David Powers4h 31m Intermediate
Managing PHP Persistent Sessionswith David Powers2h 41m Intermediate
1. Project Explanation and Goals
2. Authentication Options and Tradeoffs
Cross framework middleware1m 32s
3. Create a Read-Write API
4. File Uploads via API
5. Scale Your API
Next steps1m 46s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.