S3 bucket setting

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
IvanIgniter
Posts: 58
Joined: 01 Dec 2021, 07:41

S3 bucket setting

Post by IvanIgniter » 25 Apr 2022, 11:22

I am using laravel 6.x, PHP 7.4, Docker desktop/Ubuntu and the Aimeos 2021 (aimeos-laravel: 2021.10.4 / aimeos-core: 2021.10.13)

I have read the settings provided in https://aimeos.org/docs/2021.x/laravel/ ... atic-files
and successfully installed https://github.com/aimeos/ai-filesystem and this is my settings.
s3 shop settings.jpg
s3 shop settings.jpg (71.07 KiB) Viewed 882 times
Kindly help because I noticed after successfully saving product image without any error I did not find the image in my s3 bucket and I also noticed that the product images are not stored in public/aimoes folder anymore. Please guide what did I miss in my configuration. Thank you.

User avatar
aimeos
Administrator
Posts: 7923
Joined: 01 Jan 1970, 00:00

Re: S3 bucket setting

Post by aimeos » 26 Apr 2022, 07:53

Hard to say, especially because you've gotten no error when saving products with images. Maybe the image is stored in S3 but not where you expect it to be.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
IvanIgniter
Posts: 58
Joined: 01 Dec 2021, 07:41

Re: S3 bucket setting

Post by IvanIgniter » 27 Apr 2022, 10:43

Thank you for the respond. We found out that the S3 bucket provided was not set to be publicly accessable via url. Now it is working. Can I followup another question how to set config/shop.php resource to use the local if .env.APP_ENV=development to use
'resource' => []

and use the
'resource' => [
'fs' => [
'adapter' => 'FlyAwsS3',
'credentials' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
],
'region' => env('AWS_DEFAULT_REGION'),
'version' => 'latest',
'bucket' => env('AWS_BUCKET_SHOPPING'),
'baseurl' => env('AWS_URL_SHOPPING'),
]
]
if .env.APP_ENV != development?

User avatar
aimeos
Administrator
Posts: 7923
Joined: 01 Jan 1970, 00:00

Re: S3 bucket setting

Post by aimeos » 28 Apr 2022, 05:42

You can use:

Code: Select all

'resource' => [
	'fs' => [
		'adapter' => env('APP_ENV') == 'development' ? 'Standard' : 'FlyAwsS3',
		'credentials' => [
			'key' => env('AWS_ACCESS_KEY_ID'),
			'secret' => env('AWS_SECRET_ACCESS_KEY'),
		],
		'region' => env('AWS_DEFAULT_REGION'),
		'version' => 'latest',
		'bucket' => env('AWS_BUCKET_SHOPPING'),
		'baseurl' => env('APP_ENV') == 'development' ? env( 'ASSET_URL' ) . '/aimeos' : env('AWS_URL_SHOPPING'),
		'basedir' => public_path( 'aimeos' ),
		'tempdir' => storage_path( 'tmp' ),
	]
]
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
IvanIgniter
Posts: 58
Joined: 01 Dec 2021, 07:41

Re: S3 bucket setting

Post by IvanIgniter » 28 Apr 2022, 06:41

I will try.. Thank you

Post Reply