Thinkphp3.2.2 combined with Qiniu question 100 points posted by great gods! Currently, I am using the thinkphp3.2.2 framework to build our project. TP combines Qiniu and Qiniu driver class libraries. normal uploads can all be implemented. Now, I encountered a problem: I used the localResizeIMG plug-in to compress the image on the front end, get a base64 code for the compressed image, and then ajax is sent to the background, now, in the tp environment, how can I upload the base64 image to Qiniu?
Reply to discussion (solution)
Tp is not a combination of Qiniu, it should be through the interface that requests Qiniu,
Pass the image to Qiniu server,
The tp processing method should be the post operation of curl.
I compress the image with front-end ajax, and get a base64 object instead of a file.
Decodes and restores data to a file on your server, and then uploads the file.
Your server must have a post image to the qianniu server. before the post, you can decode the base64 format image obtained from the front-end and get the normal image.
Thank you for your help! Qiniu provides base64 Upload solution