Skip to content
Advertisement

imagesx() expects parameter 1 to be resource, string given

I try to upload multiple files to my bucket earlier it worked well but now I try to resize and compress the image before upload, it throws error imagesx() expects parameter 1 to be resource, string given here is the code :

JavaScript

I am trying to upload this final $im to bucket , I have already installed gd library in my cent os

Advertisement

Answer

The key problem was posting sourcefile to s3 bucket I changed that to body , also I changed my php settings to allow file upload till 5 mb

Here is the solution:

JavaScript

And while uploading to bucket

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement