I moved my site to a new server and the whole migration excluding ActiveStorage was successful.
now I can upload new attachments / images but older ones will not be displayed. what could be the reason? the storage folder and database tables of ActiveStorage were both fully migrated.
Have you confirmed that the old attachments are under the same directory structure as the new ones? And that the ownership and permissions for the old attachments will allow the Rails server process(es) to read the files?
Come to think of it, I’d also recommend checking your web server site config file. Make sure it’s identical, or very nearly so, on both the old and new systems.
Started GET “/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhZVEUxTm10dGN6ZGpkR2N4Wkhoelkza3lkVFpoZW1veWNHVjVZd1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpV1dsdWJHbHVaVHNnWm1sc1pXNWhiV1U5SWxKa1pXeFRNalZmTVRBNE1IZ3hNRGd3Y0hndVVFNUhJanNnWm1sc1pXNWhiV1VxUFZWVVJpMDRKeWRTWkdWc1V6STFYekV3T0RCNE1UQTRNSEI0TGxCT1J3WTdCbFE2RVdOdmJuUmxiblJmZEhsd1pVa2lEbWx0WVdkbEwzQnVad1k3QmxRNkVYTmxjblpwWTJWZmJtRnRaVG9LYkc5allXdz0iLCJleHAiOiIyMDI0LTA5LTEyVDIwOjUwOjQyLjA2NloiLCJwdXIiOiJibG9iX2tleSJ9fQ==–64dbe3814aeb95983874748820bd6edb58c4dee8/RdelS25_1080x1080px.PNG” for xxx.xxx.xxx.xxx at 2024-09-12 22:45:42 +0200
Cannot render console from xxx.xxx.xxx.xxx! Allowed networks: 127.0.0.0/127.255.255.255, ::1
Processing by ActiveStorage::DiskController#show as /
That Completed 304 log entry indicates that the server believes that your browser already has a cached copy of the image. So clear the browser cache and reload the image. (Low probability, but easy to try!)