public function uploadFileWithFolderAndName(UploadedFile $file, $folderPath, $fileName)
    {

        $folderPath = !empty($folderPath) ?   $folderPath  . '/' : '';
        $path =   $this->env . '/' . $folderPath . $fileName . '.'. $file->guessClientExtension();
        /** @var Result $result */
        $result = $this->client->putObject([
            'ACL' => 'public-read',
            'Bucket' => $this->bucketName,
            'SourceFile' => $file->getRealPath(),
            'Key' => $path
        ]);
        
        return new FileUploadedModel($path, $result->get('ObjectURL'), FileUploadedModel::VENDOR_S3);
    }
public function uploadFileWithFolderAndName(UploadedFile $file, $folderPath, $fileName)
    {

        $folderPath = !empty($folderPath) ?   $folderPath  . '/' : '';
        $path =   $this->env . '/' . $folderPath . $fileName . '.'. $file->guessClientExtension();
        /** @var Result $result */
        $result = $this->client->putObject([
            'ACL' => 'public-read',
            'Bucket' => $this->bucketName,
            'SourceFile' => $file->getRealPath(),
            'Key' => $path
        ]);
        
        return new FileUploadedModel($path, $result->get('ObjectURL'), FileUploadedModel::VENDOR_S3);
    }
public function uploadFileWithFolderAndName ( UploadedFile $ file , $ folderPath , $ fileName ) { $ folderPath = ! empty ( $ folderPath ) ? $ folderPath . '/' : '' ; $ path = $ this -> env . '/' . $ folderPath . $ fileName . '.' . $ file -> guessClientExtension ( ) ; /** @var Result $result */ $ result = $ this -> client -> putObject ( [ 'ACL' => 'public-read' , 'Bucket' => $ this -> bucketName , 'SourceFile' => $ file -> getRealPath ( ) , 'Key' => $ path ] ) ; return new FileUploadedModel ( $ path , $ result -> get ( 'ObjectURL' ) , FileUploadedModel :: VENDOR_S3 ) ; }
Uploads a file to amazon s3 using

@param UploadedFile $file
@param string $folderPath
@param string $fileName
@return string
Uploads a file to amazon s3 using