-1

Similar to ActiveStorage::FileNotFoundError but the file actually exists but using a database backend.

The underlying data appears to be still present in active_storage_blobs table. However, Rails just throws a ActiveStorage::FileNotFoundError. Is there something that can cause Active Storage data to become expired?

prusswan
  • 6,853
  • 4
  • 40
  • 61

1 Answers1

0

The problem is that the data is not actually stored in the database (despite the active storage tables) - the blob is written to disk. My setup (using Capistrano) did not use a common storage location across multiple deployments, so files uploaded in previous deployments become inaccessible after a new deployment. Using a common symlinked location should fix this.

prusswan
  • 6,853
  • 4
  • 40
  • 61