PHP code example of stetodd / s3-multipart-upload-bundle
1. Go to this page and download the library: Download stetodd/s3-multipart-upload-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stetodd / s3-multipart-upload-bundle example snippets
Stetodd\S3MultipartUploadBundle\StetoddS3MultipartUploadBundle::class => ['all' => true],
use Symfony\Component\DependencyInjection\Attribute\AsAlias;
#[AsAlias(UploadResolverInterface::class)]
final readonly class FileUploadResolver implements UploadResolverInterface
{
public function resolve(string $uploadId): ResolvedUpload
{
$upload = $this->repository->findByUploadId($uploadId)
?? throw UploadNotFoundException::forUploadId($uploadId);
return new ResolvedUpload($upload->getKey(), $upload->getTargetType());
}
}
yaml
stetodd_s3_multipart_upload:
resource: '@StetoddS3MultipartUploadBundle/config/routes.php'
prefix: /s3