Reputation: 162
I am trying to upload file to Amazon S3, but still got an error.
local.ERROR: The PutObject operation requires non-empty parameter: Bucket {"exception":"[object] (InvalidArgumentException(code: 0): The PutObject operation requires non-empty parameter: Bucket at /usr/share/nginx/html/PaymentCloud-API/vendor/aws/aws-sdk-php/src/InputValidationMiddleware.php:64)
I looked at all posts related to this in stackoverflow and github. This is the way I used to upload file.
Storage::disk('s3')->put('filename', 'content')
I checked content and I received it successfully. I checked s3 configuration in .env and filesystems.php, but they are all fine.
Upvotes: 2
Views: 3264
Reputation: 162
I solved this issue!!!
It took a lot of time to fix it, but finally the solution was really simple.
It was just because of the .env cache. So I just cleared the cache and restart my server.
Now, it works.
php artisan config:clear
php artisan cache:clear
Upvotes: 8