Getting ai-filesystem to work
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Getting ai-filesystem to work
I'm having trouble getting the ai-filesystem extension to work.
First problem: I can't get it to install using composer. Here's my composer.json file:
Running composer update to install the filesystem gives me an error:
So, I went to github and downloaded the Zip for the extension. I unzipped everything so the extension is now in ext/ai-filesystem
I configured this in config/shop.php:
I know the Amazon S3 stuff in the .env file works because I'm using it in a different part of the web site.
Not that it matters, but config/filesystems.php looks like:
When I upload media, such as when creating a new product or whatever, everything is still stored locally. What am I doing wrong?
First problem: I can't get it to install using composer. Here's my composer.json file:
Code: Select all
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"aimeos/aimeos-laravel": "~1.0",
"aimeos/ai-filesystem": "dev-master"
},
Code: Select all
Problem 1
- The requested package aimeos/ai-filesystem could not be found in any version, there may be a typo in the package name.
I configured this in config/shop.php:
Code: Select all
'resource' => array(
'db' => array(
'adapter' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', ''),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'stmt' => array( "SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'" ),
'opt-persistent' => 0,
'limit' => 2,
),
'fs' => array(
'adapter' => 'FlyAwsS3',
'credentials' => array(
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
),
'region' => env('AWS_REGION'),
'version' => 'latest',
'bucket' => env('AWS_BUCKET'),
'prefix' => 'webstore',
),
),
Not that it matters, but config/filesystems.php looks like:
Code: Select all
return [
'default' => 's3',
'cloud' => 's3',
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'ftp' => [
'driver' => 'ftp',
'host' => 'ftp.example.com',
'username' => 'your-username',
'password' => 'your-password',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
],
];
Re: Getting ai-filesystem to work
The new file system layer is only available for dev-master and the upcoming release.
Then, you only need to configure this for AWS S3:
where 's3' is the name of the Laravel configuration in "config/filesystems.php::disks"
Then, you only need to configure this for AWS S3:
Code: Select all
'resource => array(
...
'fs' => 's3'
),
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
