in src/Filter/File/S3RenameUpload.php [72:86]
protected function getFinalTarget($source, $clientFileName)
{
// We cannot upload without a bucket
if (null === $this->options['bucket']) {
throw new MissingBucketException('No bucket was set when trying to upload a file to S3');
}
// Get the tmp file name and convert it to an S3 key
$key = trim(str_replace('\\', '/', parent::getFinalTarget($source, $clientFileName)), '/');
if (strpos($key, './') === 0) {
$key = substr($key, 2);
}
return "s3://{$this->options['bucket']}/{$key}";
}