I have a usecase, where I have uploaded a file using carrierwave fog-google on GCS bucket. However using some other code, I am processing the same file then re-uploading it after changing size and name from google-cloud-storage APIs. Now at the same location we have two files. One is original and other one is processed file.
Here my query is, how to update the new file attributes in carrierwave active record stored in mongoDB for the original file. I want to update the file location, url, name, path all other attributes etc from the original file to processed file.
Is there any way we can achieve it using carrierwave functionality. Any help would be appriciated.
There's no ready-made way to do so. What's stored in the ActiveRecord column is just a String value, you can use AR's #update_columns to update it in a desired way without interacting with CarrierWave.
I have a usecase, where I have uploaded a file using carrierwave fog-google on GCS bucket. However using some other code, I am processing the same file then re-uploading it after changing size and name from google-cloud-storage APIs. Now at the same location we have two files. One is original and other one is processed file.
Here my query is, how to update the new file attributes in carrierwave active record stored in mongoDB for the original file. I want to update the file location, url, name, path all other attributes etc from the original file to processed file.
Is there any way we can achieve it using carrierwave functionality. Any help would be appriciated.