Download the PHP package devwizardhq/laravel-filex without Composer

On this page you can find all versions of the php package devwizardhq/laravel-filex. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-filex

Laravel Filex

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Laravel Filex is a powerful, modern, and enterprise-grade file upload component for Laravel applications. Built on top of Dropzone.js, it provides a seamless drag-and-drop file upload experience with advanced features including chunked uploads, real-time progress tracking, comprehensive security validation, temporary file handling, quarantine system, and intelligent file management.

๐Ÿš€ Features

๐Ÿ“‹ Requirements

๐Ÿ“ฆ Installation

Install the package via Composer:

Quick Setup (Recommended)

The package automatically publishes its configuration and assets when installed. For manual installation or to republish files:

Asset Integration

Add the assets directive to your main layout file:

This directive automatically includes all required CSS, JavaScript, and route configurations with performance optimizations.

๐Ÿ”ง Basic Usage

Simple File Upload

Multiple File Upload

Advanced Configuration

๐ŸŽ›๏ธ Component Props

Property Type Default Description
name string 'files' Input name for form submission
multiple boolean false Allow multiple file selection
accept string null Accepted file types (MIME types or extensions)
maxFiles integer null Maximum number of files allowed
maxSize integer 10 Maximum file size in MB
minSize integer null Minimum file size in MB
required boolean false Make the field required
disabled boolean false Disable the uploader
readonly boolean false Make the uploader read-only

UI Customization Props

Property Type Default Description
label string null Field label
placeholder string null Placeholder text
helpText string null Help text below the field
showProgress boolean true Show upload progress
showFileSize boolean true Show file sizes
allowPreview boolean true Enable file previews
showSuccessMessages boolean false Show success notifications
showErrorNotifications boolean true Show error notifications
errorTimeout integer 5000 Error message timeout (ms)
successTimeout integer 3000 Success message timeout (ms)
class string '' Additional CSS classes
style string '' Inline styles
wrapperClass string '' Wrapper element CSS classes

Validation Props

Property Type Default Description
rules array [] Laravel validation rules
mimes string null Allowed MIME types
extensions string null Allowed file extensions
dimensions array/string null Image dimension constraints
clientValidation boolean true Enable client-side validation

Upload Behavior Props

Property Type Default Description
autoProcess boolean true Auto-process uploaded files
parallelUploads integer 2 Number of parallel uploads
chunkSize integer 1048576 Chunk size for large files (bytes)
retries integer 3 Number of retry attempts
timeout integer 30000 Upload timeout (ms)
thumbnailWidth integer 120 Thumbnail width for previews
thumbnailHeight integer 120 Thumbnail height for previews
thumbnailMethod string 'contain' Thumbnail resize method

Event Props

Property Type Description
onSuccess string JavaScript function called on successful upload
onError string JavaScript function called on upload error
onComplete string JavaScript function called when upload completes
onFileAdded string JavaScript function called when file is added
onFileRemoved string JavaScript function called when file is removed
onUpload string JavaScript function called during upload progress

Debug and Testing Props

Property Type Default Description
debug boolean false Enable debug mode for detailed logging
value array/string [] Pre-populated file paths for editing

๐Ÿ—๏ธ Processing Uploads in Controllers

Using the HasFilex Trait

The HasFilex trait provides a clean, simple API for file upload operations:

Available HasFilex Methods

Simple Upload Methods

Validation Helpers

Cleanup

Using the Service Directly

Using the Facade

File Visibility Control

Laravel Filex supports controlling file visibility when moving from temporary to permanent storage:

๐Ÿ“ Validation Rules

Laravel Filex provides custom validation rules for enhanced file validation:

Using Custom Validation Rules

Using the FileRule Facade

Available Validation Rules

Rule Usage Description
filex_mimes filex_mimes:jpeg,png,pdf Validate file MIME types
filex_max filex_max:2048 Maximum file size in KB
filex_min filex_min:100 Minimum file size in KB
filex_image filex_image Validate as image file
filex_file filex_file Basic file validation
filex_dimensions filex_dimensions:min_width=100 Image dimension validation
filex_size filex_size:1024 Exact file size in KB

โš™๏ธ Configuration

Laravel Filex provides extensive configuration options. Publish and customize the config file:

Configuration Table

Configuration Key Type Default Description
Storage Settings
storage.disks.default string 'public' Default storage disk for permanent files
storage.disks.temp string 'local' Storage disk for temporary files
storage.max_file_size integer 10 Maximum file size in MB
storage.temp_expiry_hours integer 24 Hours before temp files expire
File Validation
validation.allowed_extensions array [...] Array of allowed file extensions
validation.allowed_mime_types array [...] Array of allowed MIME types
Upload Configuration
upload.chunk.size integer 1048576 Chunk size for large files (bytes)
upload.chunk.max_retries integer 3 Maximum retry attempts for chunks
upload.chunk.timeout integer 30000 Chunk upload timeout in milliseconds
Route Configuration
routes.prefix string 'filex' Route prefix for upload endpoints
routes.domain string null Domain for upload routes
routes.middleware array [] Additional middleware for routes
Performance Settings
performance.memory_limit string '1G' Memory limit for file operations
performance.time_limit integer 600 Time limit for file operations (seconds)
performance.parallel_uploads integer 2 Number of parallel uploads
performance.chunk_threshold integer 52428800 File size threshold for chunking (50MB)
performance.batch_size integer 5 Batch size for bulk operations
performance.optimization.lazy_loading boolean true Enable lazy loading of assets
performance.optimization.enable_caching boolean true Enable caching for better performance
performance.optimization.cache_ttl integer 3600 Cache TTL in seconds
performance.optimization.enable_compression boolean true Enable response compression
performance.optimization.max_concurrent_uploads integer 10 Maximum concurrent uploads
Rate Limiting
performance.rate_limiting.enabled boolean true Enable rate limiting
performance.rate_limiting.ip_limit integer 50 Uploads per IP per time window
performance.rate_limiting.user_limit integer 100 Uploads per user per time window
performance.rate_limiting.time_window integer 3600 Time window in seconds
performance.rate_limiting.suspend_time integer 3600 Suspend duration in seconds
Monitoring
performance.monitoring.enable_metrics boolean false Enable performance metrics
performance.monitoring.log_performance boolean false Log performance data
performance.monitoring.max_log_entries integer 1000 Maximum log entries to keep
Security Settings
security.suspicious_detection.enabled boolean true Enable suspicious file detection
security.suspicious_detection.quarantine_enabled boolean true Enable quarantine for suspicious files
security.suspicious_detection.scan_content boolean true Enable content scanning
security.suspicious_detection.validate_signatures boolean true Enable file signature validation
security.quarantine.directory string 'quarantine' Quarantine directory name
security.quarantine.retention_days integer 30 Days to retain quarantined files
security.quarantine.auto_cleanup boolean true Auto cleanup quarantined files
security.suspicious_extensions array [...] File extensions to block/flag
security.suspicious_content_patterns array [...] Regex patterns for content scanning
security.text_extensions_to_scan array [...] Text file extensions to scan
System Management
system.cleanup.enabled boolean true Enable automatic cleanup
system.cleanup.schedule string 'daily' Cleanup schedule (hourly/daily/weekly)

Environment Variables

You can configure most settings using environment variables:

Route Configuration

You can customize the route prefix, domain, and middleware for file upload endpoints:

This allows you to:

๐Ÿงน File Cleanup

Laravel Filex automatically manages temporary files with scheduled cleanup:

Manual Cleanup

Automatic Cleanup

The package automatically schedules cleanup based on your configuration:

The cleanup is automatically scheduled based on your configuration.

๐Ÿ”’ Security Features

Laravel Filex includes comprehensive security features to protect against malicious file uploads:

Multi-layer Validation

Threat Detection

Quarantine System

Suspicious files are automatically quarantined instead of being processed:

Custom Security Patterns

Add custom security patterns in your configuration:

Security Configuration

Enable or disable security features in your environment:

๐ŸŽจ Styling and Customization

CSS Customization

Laravel Filex provides comprehensive CSS classes for customization:

Component Styling

Custom Event Handlers

Component Helpers

Each uploader instance exposes helper functions for programmatic control:

๐ŸŽฏ Advanced Features

Chunked Uploads

For large files, Laravel Filex automatically enables chunked uploads:

Progress Tracking & Events

Real-time upload progress with customizable callbacks:

Image Processing & Validation

Built-in image validation and processing:

File Editing & Updates

Handle existing files in edit forms:

Bulk Operations

Process multiple files efficiently:

๐Ÿš€ Performance Optimization

Configuration Optimization

Asset Optimization

The package includes built-in performance optimizations:

Large File Handling

๐Ÿ”ง Commands

Laravel Filex provides several Artisan commands:

Command Description
filex:install Install and publish package assets
filex:cleanup-temp Clean up temporary and expired files
filex:optimize Optimize package performance
filex:info Display package information

๐ŸŒ Localization

Laravel Filex supports multiple languages out of the box.

Supported Languages

Publishing Language Files

Adding Custom Languages

  1. Create language directory: resources/lang/vendor/filex/[locale]/
  2. Copy English files:

  3. Translate the messages
  4. Set your application locale

Dynamic Language Switching

Contributing Translations

We welcome contributions for new languages! To contribute:

  1. Fork the repository
  2. Create a new language file based on the English version
  3. Translate all messages while keeping the same structure
  4. Test the translations in your application
  5. Submit a pull request

All versions of laravel-filex with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3|^8.4
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package devwizardhq/laravel-filex contains the following files

Loading the files please wait ....