PHP code example of piotrpress / upload-mimes

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

    

piotrpress / upload-mimes example snippets


define( 'UPLOAD_MIMES', [
    'jpg|jpeg|jpe' => 'image/jpeg',
    'png' => 'image/png',
    'gif' => 'image/gif',
    'ico' => 'image/x-icon',
    'pdf' => 'application/pdf',
    'zip' => 'application/zip',
] );