AWS S3 Upload Bucket - Invalid Resource Type

I am trying to align files (putObject) with my application running on Plesk, Zend 1.0 + SDK 2.0 from Amazon, but returning the following error:

Fatal error: Throw exception "Guzzle \ Common \ Exception \ InvalidArgumentException" with the message "Invalid resource type" in /var/www/vhosts/domain/library/Amazon/Guzzle/Http/EntityBody.php:50 Stack trace: # 0 / var / www / vhosts / domain / library / Amazon / Aws / Common / Client / UploadBodyListener.php (85): Guzzle \ Http \ EntityBody :: factory (false) # 1 [internal function]: Aws \ Common \ Client \ UploadBodyListener -> onCommandBeforePrepare (Object (Guzzle \ Common \ Event)) # ...

  • To download files (GetObject) works fine. Grateful
+4
source share
1 answer

This may be a character encoding problem.

I had a similar problem when transferring some text fields between a MySQL database and DynamoDB. Some special characters, such as é , were invalid UTF-8 characters. And although they were replaced with a replacement character ( ), for some reason this generated a fatal error. As a result, I had to start checking all the fields before they were placed in the database, and convert the encoding to ASCII (which was the type in which all the other lines were set). Instead of , replacing unknown characters, was used ? , so it was not a “good” fix, but prevented the script from crashing.

This is my best guess, although all I need is an error similar to the one I received. And, seeing that this question was old, he thought that I would try to answer it if someone else met it like me.

0
source

Source: https://habr.com/ru/post/1494949/


All Articles