rootstrap / active-storage-base64

Base64 support for ActiveStorage
https://rootstrap.com
MIT License
160 stars 16 forks source link

ActiveSupport::MessageVerifier::InvalidSignature when attempting to attach #37

Closed nuclearghost closed 5 years ago

nuclearghost commented 5 years ago

I just started using this gem (which seems super useful!) and upon attempting to attach the image data, it's throwing an exception ActiveSupport::MessageVerifier::InvalidSignature

The controller looks very similar to the example code.

def update
      @outfit.update!(outfit_params)
      @outfit.combined_image.attach(params[:combined_image])
end

The data is being posted from an iOS app using AlamoFire and I've verified that the base64 image is valid.

I have a feeling that it's an issue with multipart form encoding which might be outside the scope of this gem, but didn't find any examples of how to set up the form for successful submission of the file attachment.

hsul4n commented 5 years ago

@nuclearghost say the problem with me

santib commented 5 years ago

Hi, would you be able to provide a value for params[:combined_image] that makes this error happen?

nuclearghost commented 5 years ago

Hi there! Thanks for the prompt responses. It was in fact an issue with not properly multi-part form encoding the submission. That fixed it for me. Thanks for the assist!