thaiphan / magento2-s3

Use Amazon S3 as the file storage solution for your Magento 2 application
MIT License
142 stars 95 forks source link

Images not uploading to s3 #58

Open vijaydcyb opened 6 years ago

vijaydcyb commented 6 years ago

Hi @thaiphan ,

I have installed your extension and followed the steps mentioned in installation guide. 1] After running php bin/magento s3:storage:export, the console says that it's uploading the files but nothing is being uploaded to the S3 bucket.

2] I have tried to insert the images in static block from admin it throws the below error.

Error executing "PutObject" on "my bucket path" AccessDenied (client): etc

All credentials are fine and its working from CLI.

Could you please let me know the reason why it is not working as expected.

If this is the permission issue then please mention permission details

Thanks

thaiphan commented 6 years ago

Hi @vijaydcyb

Sorry for taking so long to reply.

Reading the error that you have provided, it looks like the bucket you have provided it wrong. It should not be "my bucket path". It should be whatever the name of the bucket you've specified in S3 is!

Can you please update your config and tell me if that fixes it?

Regards,

Thai

shaikhmasud147 commented 5 years ago

I have faced the same issue now. All credentials are perfect. When I run the export command images uploaded successfully but images not showing on my bucket. Can you tell me what the issue there?

Tom-T commented 5 years ago

I've had the same issue as well. Ensure you are using the credentials from Access Keys in "My Security Credentials" In addition, the bucket needs to have public permission settings allowed to be changed. This is shown in the screenshot.

image

dineshmanne commented 5 years ago

I have same issue , I given correct credentials and bucket name as well. still images are not uploading to my s3 bucket.

fankoil commented 5 years ago

In my case, I had to add the "s3:PutObjectAcl" to the policy for the IAM user, so I guess internally is setting the ACL for the object when putting it. HTH

stevenlavine commented 5 years ago

I'm having the same issue. However the following exception is being reported when uploading files to the S3 bucket (in the importFiles function of \Thai\S3\Model\MediaStorage\File\Storage\S3.php)

Unserialization failed: Decoding failed: Syntax error

jyotinykaa commented 5 years ago

@thaiphan please help me also below error.

Unserialization failed: Decoding failed: Syntax error

thaiphan commented 5 years ago

@stevenlavine @jyotinykaa

Yeah, apparently Magento changed the way serialisation worked in 2.2. Some guy made a change request to make it work but then it broke for 2.1. I'm having trouble making it work for both versions. I'll get it right eventually! Please hang tight!

jyotinykaa commented 5 years ago

@thaiphan can you please share the previous build which doesn't contain serialization fixes for 2.2

thaiphan commented 5 years ago

@jyotinykaa You can use https://github.com/thaiphan/magento2-s3/releases/tag/1.3.0

jyotinykaa commented 5 years ago

@thaiphan can u tell me how to install this package because we install this package with composer and it takes the master branch.

thaiphan commented 5 years ago

Hey @jyotinykaa

You can run

composer install thaiphan/magento2-s3@1.3.0
jyotinykaa commented 5 years ago

@thaiphan we get following error.

[InvalidArgumentException]
Could not find package thaiphan/magento2-s3@1.3.0 at any version for your minimum-stability (alpha). Check the package spelling or your mi
nimum-stability

merin3 commented 5 years ago

S3 Credentials updated as per your advice, As well as Default IAM role assigned the particualr instance should talk Defaulty to s3 bucket Get object (PUT|PUSH|PULL|GET|POST)

pub/static/version1560817443/adminhtml/Magento/backend/en_US/Magento_Catalog/images/product/placeholder/small_image.jpg

Image upload not happening when product image adding to magento2 1/5 it was only one image uploading to the product image , other image showing the static content images. also after upload to fron end webstore it was buffering very long time.

merin3 commented 5 years ago

@thaiphan can you update anything , we have been installed the as er your wiki installation steps , Product images not uploading directly from admin console , Region of bucket -Mumbai & the same region of EC2 Instance.

boldbart commented 5 years ago

For me the issue was my bucket ACL wasn't correct. During the sync it adds a setting to each object 'ACL' = 'public-read' but your bucket ACL must be configured to allow this. So on the Access Control List tab, for Public Access enable List Objects for Everyone.