In this tutorial we will create the ability to upload an image, resize an image based on any defined pixels and whitelist file extension types to protect our database.
Let’s add the gems to our gemfile:
CarrierWave comes with a generator that will create an upload class. You can generate this by running:
This will generate the following:
Uncomment out the following so it looks like this:
Here we have done a few things:
Lets create a migration...