-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What parameters does S3Client::putObject() expect? #7
Comments
I responded to your forum post earlier today with a fix: https://forums.aws.amazon.com/thread.jspa?threadID=109616&tstart=0 The docs are wrong for the Body option. We will work on getting that fixed. |
Thanks, @jeremeamia. I tried the wrapping the file name in
|
Actually, I think I may have solved it: I used |
Yes, Also, you can use the
This might work better for larger files since you won't have to load the entire file into memory at once as you would with I apologize for misleading you with my previous comment. |
Hi Jeremy. No problem. Thanks for clearing this up for me! Much appreciated. I’m new to this Guzzle 😉 |
Another question: how do I mark a uploaded file as public? I’m reading the API documentation again (http://docs.amazonwebservices.com/aws-sdk-php-2/latest/class-Aws.S3.S3Client.html) but it’s not too clear the expected values. I’m guessing I want to set something for the EDIT: Fixed it myself (again)! To mark a file as public, I imported the |
Yep, you got it! For any enum-like values we have classes under the Enum namespace for that client. Hopefully we can better call information like that out as we improve our docs. |
Cool. Is there a channel where I can report small things like this that are hard-to-understand or could be better-documented if I come across anything? |
Right here on the GitHub issue tracker is going to be the easiest for us to track. Thanks. |
No problem. |
I’m having trouble with the
putObject()
method of theS3Client
class. One of the arguments to be passed isBody
. The API documentation says this is to be an array, but doesn’t say or give an example of parameters/keys that should be contained in this array.I have an upload working, but the file being placed on my Amazon S3 set-up is empty because I’m obviously passing some incorrect data to it, and don‘t know what I should be passing. Below is my current code:
Any help would be much appreciated.
The text was updated successfully, but these errors were encountered: