I'm migrating from Shrine to Active Storage. It's very similar to migrating from paperclip. Active storage works, but the migration is not moving my existing data over properly.
Background:
2. Checked in my local database that the records are getting properly created.
siftlocal_co_development=# TABLE active_storage_attachments;
id | name | record_type | record_id | blob_id | created_at
------+--------+-------------+-----------+---------+---------------------
7848 | avatar | Profile | 1 | 7889 | 2018-03-21 03:33:51
(1 row)
siftlocal_co_development=# TABLE active_storage_blobs;
id | key | filename | content_type | metadata | byte_size | checksum | created_at
------+--------------------------------------------------------------+---------------+--------------+----------+-----------+--------------------------+---------------------
7889 | users/1/avatar/original/64024d6a2d2a3b816522a717d468123c.jpg | photobill.jpg | image/jpeg | {} | 54177 | NCc6WyXlpm3fJHI8utmAmQ== | 2018-03-21 03:33:51
(1 row)
3. Made all the code changes to use active storage.
4. I can persist and upload new images, but the old images are not transferred over.
It I view my images before active storage they point to /mybucket/aws/path/someotherstuff. If I view the image source after moving to active storage they point to /localhost3000/rails/active_storage...and they're not there.
In the GoRails video on this he says Active Storage will go download the files based on the key. So, the key in my table is the path and the checksum is the complete url with the hash.
I also updated my config to use amazon config.active_storage.service = :amazon
Not sure why my files aren't transferring.