Skip to content

md-web-app/storage-app

Repository files navigation

Overview

This application is a vanilla implementation of Active Storage in rails 6.3

ActiveStorage is the recommended library for uploading images and files to a server or cloud server.
Before ActiveStorage a project called PaperClip was the recommended file manager.
None of the code in this project was ported from a PaperClip project instead this project is built from scratch using rails new.

Do check out the commits as they are a good walkthrough on setting up ActiveStorage

Install instructions

How to easily install ruby and rails: (put the following in your terminal)

\curl -sSL https://get.rvm.io | bash -s stable --rails

You will need to ask me for the master key for this application
to gain access to the aws bucket.
If you do not have the master.key you can find the example file here:
config/master.key.example

git clone https://github.com/MichaelDimmitt/storageapp.git
cd storageapp
rails s

Order in which things are added to the project

  1. ActiveStorage image uploading to an aws s3 bucket
  2. Authenticaion (maybe simple solution or devise + omniauth.)

Scaffold commands:

rails new storageapp rails g resource comment content:text

Additional useful commands:

bin/rails active_storage:install bin/rails active_storage:install:migrations bin/rails db:migrate

You can change the master.key file using the following command:

EDITOR=vim rails credentials:edit # master key is required at this stage.

Helpful resources for this application: (listed in order of most helpful to least helpful)

https://afreshcup.com/home/2017/07/23/activestorage-samples https://medium.com/@wrburgess/a-comprehensive-list-of-activestorage-tutorials-for-rails-5-2-8ea7d4ea267e

https://guides.rubyonrails.org/active_storage_overview.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published