Skip to main content

API Response : Resource is invalid

Comments

1 comment

  • Erwin Lukas

    Hi,

    I believe you also opened a ticket to us regarding this topic as well.
    For the benefit of everyone else that may come across this, let me answer this as well.

    For base-64 encoded image, you need to make sure to follow the following format when you pass base-64 data (please check the following article for more info):

    data:[<MIME-type>][;charset=<encoding>][;base64],<data>
    

    I was able o successfully load with the following (example is in PHP):

    print_r(\Cloudinary\Uploader::upload('data:image/jpg;base64,/9j/4AAQ....wdFA4fHw'));

    Regards,
    Erwin Lukas

    0

Post is closed for comments.