$app->get('/download', [
Zestic\Download\Middleware\SecureDownloadMiddleware::class,
]);
Add to your config/config.php
file
$aggregator = new ConfigAggregator([
\Zestic\Download\ConfigProvider::class,
];
You can set up the configuration in the .env file In .env
FILES_SECUREDOWNLOADS_URL=https://amb-customer-signatures.s3.us-east-2.amazonaws.com
FLYSYSTEM_SECUREDOWNLOADS_ADAPTER=AwsS3V3
FLYSYSTEM_SECUREDOWNLOADS_BUCKET=bucket
FLYSYSTEM_SECUREDOWNLOADS_ENDPOINT=https://us-east-1.aws.com
FLYSYSTEM_SECUREDOWNLOADS_KEY=
FLYSYSTEM_SECUREDOWNLOADS_REGION=us-east-1
FLYSYSTEM_SECUREDOWNLOADS_SECRET=
FLYSYSTEM_SECUREDOWNLOADS_VISIBILITY=public
save ( file, permissions)
download (file) checks permissions