magento2-s3 icon indicating copy to clipboard operation
magento2-s3 copied to clipboard

Images not uploading to s3

Open vijaydcyb opened this issue 6 years ago • 16 comments

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

vijaydcyb avatar Aug 17 '18 18:08 vijaydcyb

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

thaiphan avatar Oct 13 '18 23:10 thaiphan

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?

shaikhmasud147 avatar Dec 17 '18 07:12 shaikhmasud147

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

Tom-T avatar Dec 25 '18 20:12 Tom-T

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

dineshmanne avatar Jan 28 '19 13:01 dineshmanne

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

fankoil avatar Jan 30 '19 20:01 fankoil

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

stevenlavine avatar Feb 11 '19 20:02 stevenlavine

@thaiphan please help me also below error.

Unserialization failed: Decoding failed: Syntax error

jyotinykaa avatar Feb 26 '19 09:02 jyotinykaa

@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!

thaiphan avatar Feb 26 '19 12:02 thaiphan

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

jyotinykaa avatar Feb 28 '19 07:02 jyotinykaa

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

thaiphan avatar Feb 28 '19 08:02 thaiphan

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

jyotinykaa avatar Feb 28 '19 10:02 jyotinykaa

Hey @jyotinykaa

You can run

composer install thaiphan/[email protected]

thaiphan avatar Mar 03 '19 11:03 thaiphan

@thaiphan we get following error.

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

jyotinykaa avatar Mar 06 '19 07:03 jyotinykaa

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 avatar Jun 20 '19 00:06 merin3

@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.

merin3 avatar Jun 22 '19 00:06 merin3

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.

boldbart avatar Aug 13 '19 18:08 boldbart