Base64 decode file upload php
I'm passing image as a base64 string from a form. Then I would like to decode it, rename it and upload it to my server folder. I can't get this to work so obviously I'm doing something wrong here. Any help would be appreciated. My code:
asked Aug 31, 2017 at 12:13
2 Using file put content you can move files to folder
Rodrirokr 1,27715 silver badges26 bronze badges answered Aug 31, 2017 at 12:22
ShibonShibon 1,4692 gold badges8 silver badges19 bronze badges 1 In this tutorial, we will let you know how to handle the image encoded with Base64 and write the image to folder. Example Core PHP:
Upload base64 to file in CodeigniterAre you looking for a way to save a PNG image server-side, from a base64 data string, or unable to upload to a base64 encoded image using Codeigniter? We can help you with that. We are creating some function for using base64 string check is valid or not and size and file type create file application/libraries/Base64fileUploads.php
Example Codeigniter :Call this class Codeigniter in controller |