PHP code example of kapitannwel / fileupload

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

    

kapitannwel / fileupload example snippets


use kapitannwel\FileUpload\FileUpload;

$file = $request->file('el');

FileUpload::generateUniqueFileName($file->getClientOriginalName(), 'folder_name');

FileUpload::deleteFile($filename, 'folder_name');

FileUpload::saveFile('folder_name', $file, $filename);