PHP code example of blalmal10a / free-upload

1. Go to this page and download the library: Download blalmal10a/free-upload 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/ */

    

blalmal10a / free-upload example snippets


use Blalmal10a\FreeUpload\Forms\Components\FreeUpload;

FreeUpload::make('file')
    ->multiple()
    ->acceptedFileTypes(['image/*', 'application/pdf'])

FreeUpload::make('file')
    ->maxEncodedFileMb(10)                  // override the encoded-upload size cap per component

use App\Forms\Components\FreeUpload;

FreeUpload::make('file')
    ->multiple()
    ->acceptedFileTypes(['image/*', 'application/pdf']);
bash
php artisan vendor:publish --tag="free-upload-config"
bash
php artisan freeupload:publish-component
bash
php artisan freeupload:publish-component --namespace="MyApp\Forms\Components"