Fileupload — Gunnerproject
:
$upload->setAdapter(new \GunnerProject\Storage\S3Adapter([ 'key' => 'YOUR_AWS_KEY', 'secret' => 'YOUR_AWS_SECRET', 'bucket' => 'my-uploads', 'region' => 'us-east-1' ])); Run custom logic after successful upload: gunnerproject fileupload
// In your controller (e.g., UploadController.php) use GunnerProject\FileUpload; $upload = new FileUpload([ 'allowed_types' => ['jpg', 'png', 'pdf', 'docx'], 'max_size' => 10 * 1024 * 1024, // 10 MB 'upload_dir' => '/var/www/uploads/', 'sanitize_filename' => true ]); setAdapter(new \GunnerProject\Storage\S3Adapter([ 'key' =>
$upload = new FileUpload([ 'chunk_size' => 2 * 1024 * 1024, // 2 MB per chunk 'resumable' => true, 'parallel_chunks' => 3 // Max concurrent chunks ]); On the client side, use the included JavaScript library: UploadController.php) use GunnerProject\FileUpload
if ($_SERVER['REQUEST_METHOD'] === 'POST') $result = $upload->process($_FILES['userfile']);
