@post.images.attach sometimes raises ActiveSupport::MessageVerifier::InvalidSignature (mismatched digest)

I have this controller action:

  def attach_image
    if @post.images.attach params[:image]
      # success response
      # unprocessable entity

And this is the code in the model:

class Post < ApplicationRecord
  has_many_attached :images do |attachable|
    attachable.variant :medium, resize_to_fit: [800, 1600]
  validates :images, processable_image: true, content_type: ['image/png', 'image/jpeg'], size: { less_than: 10.megabytes }

The code works properly, however in production logs I find some errors like this:

ActiveSupport::MessageVerifier::InvalidSignature (mismatched digest):
app/controllers/posts_controller.rb:33:in `attach_image'

I cannot reproduce the issue, so I don’t know what is causing that strange exception for some uploads…

Any idea?

i have the same pb, have you find a way ?