Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8954539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:20:08+00:00 2026-06-15T14:20:08+00:00

When upgrading from paperclip 2 to paperclip 3 my image upload API brakes. This

  • 0

When upgrading from paperclip 2 to paperclip 3 my image upload API brakes. This code used to work :

def decode_cover_image_data(cover_image_data)
    data = StringIO.new(Base64.decode64(cover_image_data))
    data.class.class_eval { attr_accessor :original_filename, :content_type }
    data.original_filename = "cover.png"
    data.content_type = "image/png"

    self.photo = data
end

It now raises a NoHandleError exception :

“Paperclip::AdapterRegistry::NoHandlerError (No handler found for
“/9j/4AAQD/4Q[…]wooooGf/9k=”

Did anybody encounter this problem ?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:20:08+00:00Added an answer on June 15, 2026 at 2:20 pm

    I found where the problem was coming from, it’s quite stupid…

    In my controller update method i had something like :

      def update
        ...
        if p[:photo]
          @user_ipad.decode_cover_image_data(p[:photo])
        end
    
        unless @user_ipad.update_attributes(p)
          render :json => {:errors => @user_ipad.errors}
        end
      end
    

    The issue is that i’m setting the user photo 2 times :

    • Once in @user_ipad.decode_cover_image_data(p[:photo])
    • Once in @user_ipad.update_attributes(p)

    The crash occured when saving the base64 string (still in the parameters) with update_attributes. Actually what surprise me is that this piece of code works with Paperclip 2.4.5 …

    After upgrading to Paperclip 3.3.1 i solved my problem by replacing my update method with this :

      def update
        ...
        if p[:photo]
          p[:photo] = @user_ipad.decode_cover_image_data(p[:photo])
        end
    
        unless @user_ipad.update_attributes(p)
          render :json => {:errors => @user_ipad.errors}
        end
      end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After upgrading from Visual Studio 2010 to 2012 code started throwing ArgumentOutOfRangeException - Index
I am using paperclip version 3.x.x for uploading image .When i tried to upload
Here is the log from a successful 1 image upload: Started POST /kampagners for
I'm upgrading from Delphi 2005 to Delphi 2010. I'm having this problem : the
The company I work at is considering upgrading from Windows 7 to Windows 8.
In upgrading from ExtJS3 to ExtJS4, one specific instance of our prior code not
I found this after upgrading from Oracle 11g Release 1 to Release 2. The
I just upgrading from Rails 3 to 3.1, and am getting this error: NoMethodError
This might sound silly, but my umbraco 5.1 application (after upgrading from 5.0) simply
Upgrading from ASP.NET WebAPI Beta to RC has provided some amount of excitement and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.