Is ist possible to decode an public url to a storage blob in rails console

27 Views Asked by At

My rails app does serve files from Active Storage Service with URLs like

http://host.com/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhORzU1WVRCeU1EZzJkWGt5Y25ZME1qQjNaWFV3WVhscGQzZGlNd1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpWUdsdWJHbHVaVHNnWm1sc1pXNWhiV1U5SWxKRlN5MUNjbTl6WTJoMWNtVmZNalF3TVRBNUxuQmtaaUk3SUdacGJHVnVZVzFsS4oxVlZFWXRPQ2NuVWtWTExVSnliM05qYUNWRE15VkNRM0psWHpJME1ERXdPUzV3WkdZR093WlVPaEZqYjI1MFpXNTBYM1I1Y0dWSkloUmhjSEJzYVdOaGRHbHZiaTl3WkdZR093WlVPaEZ6WlhKMmFXTmxYMjVoYldVNkNteHZZMkZzIiwiZXhwIjoiMjAyNC0wMS0wOVQxNjoxMzo0Ni45NTlaIiwicHVyIjoiYmxvYl9rZXkifX0=--592492456a365f9edb2ce5010182a440be786d04/filename.pdf

I would like to determine the physical destination (Disk Storage Service) of the file served. How can I obtain the Storage Blob's key at runtime using the rails console?

0

There are 0 best solutions below