Giter Club home page Giter Club logo

Comments (3)

y9v avatar y9v commented on September 26, 2024

Can you please give me an example of data, which you try to submit?

from carrierwave-base64.

hopsor avatar hopsor commented on September 26, 2024

I also experienced this problem and solved it by removing that condition. It turns out not all image's base64 strings end with "==". You can read more about that here:

http://stackoverflow.com/questions/6916805/why-does-a-base64-encoded-string-have-an-sign-at-the-end

Regarding my solution I'm not really sure if it's the best one but it works anyways. On the other hand we can add a regular expression to make sure the string is a base64 encoded one but it might not be very efficient since most of the base64 strings are gonna be really long.

from carrierwave-base64.

y9v avatar y9v commented on September 26, 2024

If so, then it makes to sense to keep an additional condition in the code. The check for the string type should already do the separation of uploaded files from encoded strings.

Can you do a pull request then?

from carrierwave-base64.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.