You are here

private function AjaxController::s3FileExists in S3 File System CORS Upload 8

Check whehter a passed file name exists (using the file key).

2 calls to AjaxController::s3FileExists()
AjaxController::createFileKey in src/Controller/AjaxController.php
Create a new file key if the original one already exists.
AjaxController::getKey in src/Controller/AjaxController.php
Return the file key (i.e. the path and name).

File

src/Controller/AjaxController.php, line 204

Class

AjaxController
Default controller for the s3fs_cors module.

Namespace

Drupal\s3fs_cors\Controller

Code

private function s3FileExists($key) {
  $config = $this
    ->config('s3fs.settings');
  $bucket = $config
    ->get('bucket');
  return $this->s3Client
    ->doesObjectExist($bucket, $key);
}