Download the PHP package awaisjameel/base64filehandler without Composer
On this page you can find all versions of the php package awaisjameel/base64filehandler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download awaisjameel/base64filehandler
More information about awaisjameel/base64filehandler
Files in awaisjameel/base64filehandler
Package base64filehandler
Short Description A Laravel package for handling and storing base64 encoded files.
License MIT
Homepage https://github.com/awaisjameel/base64filehandler
Informations about the package base64filehandler
Base64 File Handler
A Laravel package for handling and storing base64 encoded files.
Installation
You can install the package via composer:
The package will automatically register its service provider if you're using Laravel 5.5+.
You can publish the configuration file with:
Configuration
After publishing the configuration file, you can find it at config/base64-file-handler.php
. The configuration allows you to set:
- Default storage disk
- Default storage path
- Allowed file extensions
- Valid image extensions
Usage
Basic Usage
You can use the facade to store base64 encoded files:
Validating Images
Getting File Information
Direct Instantiation
You can also use the class directly without the facade:
Error Handling
The package throws exceptions when:
- The base64 data is invalid
- The file extension is not allowed
- The image extension is invalid (when validating images)
- Unable to store the file
Wrap your code in try-catch blocks to handle these exceptions.
Testing
License
The MIT License (MIT). Please see License File for more information.
All versions of base64filehandler with dependencies
awaisjameel/mimetypes Version dev-main
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0