I am using Flysystem module with flysystem_dropbox and flysystem_s3 for storage. I have configured the schemes in settings.php as described in readme.txt files of the modules.
Now when I am syncing the files from local to dropbox or local to s3 the sync process is working fine but if I try to store file directly from a node add form to dropbox or s3 its not working. I am getting the following errors in recent log messages link
Dropbox error :
The upload directory dropboxexample:// for the file field field_dropbox_file could not be created or is not accessible. A newly uploaded file could not be saved in this directory as a consequence, and the upload was canceled.
S3 error :
Aws\S3\Exception\S3Exception: Error executing "PutObject" on "https://s3-eu-west-1.amazonaws.com/drupal8test/"; AWS HTTP error: Client error response [url] https://s3-eu-west-1.amazonaws.com/drupal8test/ [status code] 400 [reason phrase] Bad Request IllegalLocationConstraintException (client): The unspecified location constraint is incompatible for the region specific endpoint this request was sent to. - <?xml version="1.0" encoding="UTF-8"?> <Error><Code>IllegalLocationConstraintException</Code><Message>The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.</Message><RequestId>A0EFF7B64110C2C5</RequestId><HostId>hze5fRf4JLZYsWLrlT5djroRwL/LrxWgzFX9qU5tP+riDfBeYNn900z36HtwktejaqckD2Gwhss=</HostId></Error> in Aws\WrappedHttpHandler->parseError() (line 153 of /var/www/html/drupal8/core/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php).
My scheme configuration is like below:
$schemes = [
'dropboxexample' => [
'driver' => 'dropbox',
'config' => [
'token' => '[my-token]',
'client_id' => '[my login email id]',
],
],
's3example' => [
'type' => 's3',
'driver' => 's3',
'config' => [
'key' => '[my-access-key]',
'secret' => '[my-secret-key]',
'region' => 'eu-west-1',
'bucket' => '[bucket-name]',
'cname' => '[bucket-url]',
],
],
'localexample' => [
'driver' => 'local',
'config' => [
'root' => '/var/www/html/drupal8/sites/default/files',
],
'cache' => FALSE,
'replicate' => 'dropboxexample',
'serve_js' => TRUE,
'serve_css' => TRUE,
]
];
$settings['flysystem'] = $schemes;
So can anyone tell me if I am missing some configuration settings or something else?