The Advanced Upload plugin allows you to upload PDF files with preview functionality along with Filament's default file upload features. This package provides a seamless way to handle PDF uploads with customizable preview options.
- PDF file upload with live preview
- Customizable preview height
- Configurable page display
- Optional toolbar controls
- Adjustable zoom levels
- Multiple fit types for PDF display
- Optional navigation panes
- Seamless integration with Filament forms
You can install the package via composer:
composer require asmit/filament-uploadphp artisan filament:assetsuse Asmit\FilamentUpload\Forms\Components\AdvancedFileUpload;
public static function form(Form $form): Form
{
return $form
->schema([
AdvancedFileUpload::make('file')
->label('Upload PDF')
->pdfPreviewHeight(400) // Customize preview height
->pdfDisplayPage(1) // Set default page
->pdfToolbar(true) // Enable toolbar
->pdfZoomLevel(100) // Set zoom level
->pdfFitType(PdfViewFit::FIT) // Set fit type
->pdfNavPanes(true) // Enable navigation panes
]);
}| Method | Description | Default |
|---|---|---|
pdfPreviewHeight() |
Set the height of PDF preview | 320px |
pdfDisplayPage() |
Set the default page to display | 1 |
pdfToolbar() |
Enable/disable toolbar controls | false |
pdfZoomLevel() |
Set the zoom level percentage | 100 |
pdfFitType() |
Set the PDF fit type | FIT |
pdfNavPanes() |
Enable/disable navigation panes | false |
If you discover a security vulnerability within this package, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.
