Add aws-s3 gem for Amazon AWS
- gem 'aws-s3', '~> 0.6.3'
Update Gemfile.lock
- Add gem aws-s3 gem dependencies
Specify require aws/s3 in Gemfile
- In order to use it, this is necessary
Add AWS connection to application
- AWS secret key is exported to the ENV
- AWS access id is also exported to the ENV
Add bucket to application.rb
- Bucket name is currently hypemanmusic
- Bucket will be where music is kept on AWS
Move AWS to inside application module
- Needs to be instantiated with the application
Add methods for Songs controller
- Index, Upload, and Delete
Add method to get bucket from AWS
- BUCKET is constant for my AWS bucket
Add variable to objects in AWS bucket
- Since AWS bucket is full of songs, the instance variable is named songs
- The objects method returns a hash of all the songs in the bucket
Add index view for songs
- This is just an unordered list of all the songs in the bucket
- There is a link to delete the song
- There is a warning given to the user before confirmation of song deletion
Add delete method in Song controller
- Delete song method will look to in AWS bucket to see if it finds a song
- If it finds the song, it will delete it from AWS bucket
- If it does not find the song, a error message will flash
- Redirects user to root path
Add upload song form to songs index page
- Users can now use the form to upload songs
- May move to a separate page or partial later on...
Add sanitize name method
- Sanitize name is a private method that will clean up the formatting of the file name before it is sent to AWS S3 for storage
Add upload method for Songs in Song controller
- Error handling for errors in song upload as well
- If successful, it will redirect to root path
Change aws-s3 gem to aws-sdk
- Specify version 1.0
- More flexible with AWS
Update Gemfile.lock
- Change aws-s3 gem to aws-sdk gem
Add songs index to list all songs
- Basic template to list all songs in the AWS bucket
Add resources routes for Songs
- Will later delete unused routes
Change configuration for AWS connection using aws-sdk gem
- Syntax is a bit different but secret data is still stored in the ENV
Change syntax for aws-sdk gem for index method
- Still need to implement upload and delete