You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with uploader connected to s3 (fog and carrierwave-aws backends have same behavior) after updating file only file name in database is updated, but new file on s3 is not uploaded (old file stays on s3). This issue only on updating file, creating new object works ok.
Have you isolated this problem and made sure this is really caused by counter_culture? I.e., if you leave everything else the same, and only remove counter_culture, then it works?
I just took a look at the code to see how counter_culture could be causing this and I honestly don't see how. counter_culture adds a after_create, after_destroy and after_update callback -- but those all have unusual names and shouldn't interfere with any other hooks.
I'm going to close this for now as I don't think this is related to counter_culture. Feel free to reopen if you have some more information tying this directly to counter_culture.
@magnusvk I have. I have uploads which fail to save the file (both s3 and file stores) and commenting out the model's counter_culture line fixes it. Also overriding _update_counts_after_update to a no-op eliminates the error but overriding after_commit_action's _after_commit_hook does not eliminate the problem. I'm still investigating and hope to find the problem.
I've found the problem, and it is not a bug in counter_culture. The problem is that carrierwave is not properly handling the dup and there is already a PR to fix it: carrierwaveuploader/carrierwave#1544
If you create model like this
with uploader connected to s3 (fog and carrierwave-aws backends have same behavior) after updating file only file name in database is updated, but new file on s3 is not uploaded (old file stays on s3). This issue only on updating file, creating new object works ok.
I've created same issue in carrierwave project.
The text was updated successfully, but these errors were encountered: