Storing files online is not difficult once Amplify sets up the configuration. Again, the app needs some CocoaPods for the frameworks. Once those are installed the app can use the AWS S3 Transfer Utility classes to upload and download files. The files are stored in the S3 bucket created for you by Amplify.
- [Instructor] So we're all ready to start uploading files…so let's do this, first thing we should probably do…is on line 17 give this thing an image name.…So I'm going to change the decoration to assign it to a string.…So I'm going to type an empty string…with two string interpolated expressions in it.…The first one's going to be…AWSMobileClient.sharedInstance.username…and I'm going to force unwrap that.…I'll also copy that and make that the username value…just above it on line 16.…The second string interpolated value for the image name…is going to be the date open, close peran….timeIntervalSince1970, so that will be a unique name…and then finally on line 15 for the ID I'm going to always…set that to a UUID open, close peran .uuidString.…
So now the only thing we ever need to set on this…is the image so let's go to insertNewObject…where we set those and change the code.…We can just delete these two lines on 205 and 206.…We just have to set the image at this point.…So now, one we've stored the item online,…we want to upload the file.…
Author
Released
1/8/2019- Working with the Amplify toolchain
- Creating a React app
- Adding analytics to a React app with Amplify
- User authentication via AWS
- Using Amplify to simplify account creation and management
- Creating a GraphQL API
- Storing files online
Skill Level Intermediate
Duration
Views
Related Courses
-
AWS API Gateway with HTTP, Lambda, DynamoDB, and iOS
with Bear Cahill1h 33m Intermediate -
AWS Security Best Practices for Developers
with Carlos Rivas46m 31s Intermediate
-
Introduction
-
1. AWS Amplify Overview
-
Introduction to Amplify4m 13s
-
Amplify principles2m 59s
-
Amplify toolchain2m 47s
-
-
2. Amplified React App
-
Analytics added with Amplify4m 47s
-
App hosting in S32m 38s
-
User authentication via AWS4m 45s
-
Lambdas created2m 30s
-
3. Mobile App Features
-
AWS CocoaPods2m 13s
-
Account management1m 11s
-
4. Serverless Back End
-
GraphQL API5m 28s
-
Mobile app and AppSync4m 42s
-
Store online function4m 54s
-
Save data to the server3m 35s
-
Fetch items from the server4m 52s
-
-
5. Storing Files Online
-
File storage configuration2m 19s
-
Downloading files4m 47s
-
Delete items from AWS1m 30s
-
Delete files from a bucket4m 35s
-
Debugging1m 13s
-
Billing and clean up2m 32s
-
-
Conclusion
-
Next steps42s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: File storage from the app