I have a "screenshot" of a div using a javascript library named html2canvas. It returns the "screenshot" as base 64 encoded image which I then pass to my PHP server using AJAX. The server will then temporarily save the image at the file system, upload the image to Amazon S3 and then immediately delete the file. It works, but I would like to see if it is possible to upload the image directly without saving to file system.
I know that there is a way to directly upload image through client side javascript, but I don't want to enable CORS. Also, I have found a solution for Node.js, so I guess there got to be a way to do it in PHP as well.
I noticed that there are somebody asking similar question, but there are no answer to that question, and the situation is a bit different, as I am using the official PHP SDK with the official service provider for laravel
So, is there a way I can directly upload a base64 encoded image to Amazon S3 without temporarily saving on file system?