vendredi 22 juin 2018

Error executing “PutObject” on AWS

I am trying to read .png file from storage path of laravel and upload the same into amazon s3, but i'm getting this below issue:

{ "code": 422, "status": "error", "data": { "exception": "Error executing \"PutObject\" on \"https://s3.amazonaws.com/mrxmms/123/12345_ach.png\"; AWS HTTP error: count(): Parameter must be an array or an object that implements Countable" }, "message": "Unprocessable Entity" }

Here is my sample code:

$dir = storage_path('uploads'); $image_val = $dir. '/' ."product.png";

$image_load = Storage::disk('s3')->put("123/12345.png",file_get_contents($image_val));

Can someone please help me? Thanks in advance!!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire