Download the PHP package hernol/uploadthing-php without Composer
On this page you can find all versions of the php package hernol/uploadthing-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hernol/uploadthing-php
More information about hernol/uploadthing-php
Files in hernol/uploadthing-php
Package uploadthing-php
Short Description A high-quality PHP client for the UploadThing v6 REST API
License MIT
Informations about the package uploadthing-php
UploadThing PHP Client - Laravel Package
A simplified, Laravel-focused PHP client for the UploadThing v6 REST API.
Features
- ✅ V6 API Compatible: Uses UploadThing v6
/uploadFilesendpoint - ✅ Type-safe: Full PHP 8.1+ type declarations and strict typing
- ✅ Laravel-focused: Designed specifically for Laravel applications
- ✅ Environment-based configuration: Simple configuration via environment variables
- ✅ File uploads: Upload files using presigned S3 URLs
- ✅ Webhook verification: HMAC-SHA256 signature validation with timestamp tolerance
- ✅ Simple API: Clean, straightforward interface
Quick Start
Installation
Configuration
Set your environment variables in your .env file:
Basic Usage
Upload a File
Upload with Custom Name and MIME Type
Handle Webhooks
Handle Webhook from PHP Globals
V6 API Endpoint
The client uses the UploadThing v6 /uploadFiles endpoint which:
- Prepares the upload and returns S3 presigned URL data
- Uploads the file to S3 using multipart form data
- Finalizes the upload via polling (retries up to 5 times with 1-second delays)
Error Handling
Examples
See the examples folder for complete usage examples:
- Basic File Upload
- Upload with Custom Options
- Webhook Handling
- Webhook Handler Utility
- Webhook Verifier
- Laravel Controller Example
- Error Handling
Documentation
- 📖 Usage Guide
- ⚡ Laravel Integration
Requirements
- PHP 8.1 or higher
- Composer
- UploadThing API key
Supported PHP Versions
| PHP Version | Support |
|---|---|
| 8.1 | ✅ Full support |
| 8.2 | ✅ Full support |
| 8.3 | ✅ Full support |
Laravel Integration
Service Provider (Optional)
You can create a service provider to bind the resources:
Usage in Controllers
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Security
If you discover a security vulnerability, please see our Security Policy.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Changelog
See CHANGELOG.md for a list of changes and version history.
All versions of uploadthing-php with dependencies
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/log Version ^1.0|^2.0|^3.0
guzzlehttp/guzzle Version ^7.0