Download the PHP package iamgerwin/nova-media-hub without Composer

On this page you can find all versions of the php package iamgerwin/nova-media-hub. 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 nova-media-hub

Nova Media Hub

Tests Latest Version License Total Downloads

A comprehensive media management package for Laravel Nova with advanced chunked upload support for handling large files efficiently.

Table of Contents

Features

Core Features

Chunked Upload System

Developer Features

Requirements

Component Version
PHP 8.2, 8.3+
Laravel 10.x, 11.x, 12.x
Laravel Nova 4.x, 5.x

Package Structure

Installation

Install the package via Composer:

Run the migrations to create the media library table:

Publish the configuration file (optional):

Publish translations (optional):

Register the tool in your NovaServiceProvider:

Configuration

The package configuration file is located at config/nova-media-hub.php. Key configuration options include:

Storage Configuration

Chunked Upload Configuration

Image Optimization

Usage

Basic Usage

Add the MediaHubField to your Nova resource:

Field Configuration

Single Media Selection

Multiple Media Selection

Collection-specific Selection

Hide from Listing

Model Integration

Using Media Cast

The package provides a custom cast for seamless model integration:

Accessing Media in Blade

Accessing Media in Controllers

Chunked Upload API

For custom implementations or advanced use cases, you can use the ChunkedUploader JavaScript class:

Advanced Use Cases

Custom Media Fields

Add custom metadata fields to the Media Hub:

Programmatic Media Upload

Batch Operations

Custom Image Conversions

Queue Image Processing

For better performance, queue image optimization:

Don't forget to run the queue worker:

Edge Cases

Large File Uploads (>100MB)

For very large files, adjust the chunk size and timeout settings:

Also, ensure your server has adequate disk space for temporary chunks.

Slow Network Connections

The chunked upload system handles slow connections gracefully with automatic retries. Configure retry behavior:

Concurrent Uploads

The package supports concurrent uploads using UUID-based session management. Each upload maintains its own isolated state.

Memory-Constrained Environments

The package uses streaming for chunk combination to minimize memory usage:

Interrupted Uploads

If an upload is interrupted (browser closed, connection lost), you can resume:

Cross-Domain Uploads

When uploading from a different domain, ensure CORS is properly configured:

File Type Restrictions

Restrict allowed file types:

Testing

The package includes a comprehensive test suite to ensure stability and reliability.

Running Tests

Test Structure

Writing Tests

When contributing, please include tests for new features:

Continuous Integration

The package uses GitHub Actions for automated testing across multiple PHP and Laravel versions:

View test results: GitHub Actions

Security

Security Vulnerabilities

If you discover a security vulnerability within Nova Media Hub, please send an email to [email protected]. All security vulnerabilities will be promptly addressed.

Please do not create public GitHub issues for security vulnerabilities.

Security Features

The package implements several security measures:

File Upload Security

Chunked Upload Security

Authorization

Best Practices

  1. Validate User Input - Always validate and sanitize user-provided data
  2. Restrict File Types - Only allow necessary MIME types
  3. Set Size Limits - Configure appropriate file size limits
  4. Use HTTPS - Always serve media over HTTPS in production
  5. Regular Updates - Keep the package and dependencies up to date
  6. Monitor Uploads - Log and monitor upload activity for suspicious patterns

Reported Vulnerabilities

None reported as of the latest release (0.0.3).

Maintenance

Cleanup Command

The package includes a cleanup command to remove old temporary chunk files:

Scheduled Cleanup

Add the cleanup command to your scheduler in app/Console/Kernel.php:

Monitoring Disk Usage

Monitor storage disk usage to prevent issues:

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository

  2. Create a feature branch

  3. Install dependencies

  4. Make your changes

    • Write tests for new features
    • Follow PSR-12 coding standards
    • Update documentation as needed
  5. Run tests

  6. Commit your changes

  7. Push to your fork

  8. Create a Pull Request
    • Provide a clear description of the changes
    • Reference any related issues
    • Ensure CI tests pass

Development Setup

Issues & Support

Found a bug or have a feature request? Please create an issue on GitHub:

Submit an Issue

When submitting an issue, please include:

Before Submitting an Issue

  1. Check if the issue already exists
  2. Update to the latest version
  3. Check the documentation
  4. Review closed issues for similar problems

Security Vulnerabilities

If you discover a security vulnerability, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


Links


All versions of nova-media-hub with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2 || ^8.3
laravel/framework Version ^10.0 || ^11.0 || ^12.0
laravel/nova Version ^4.0 || ^5.0
outl1ne/nova-translations-loader Version ^4.0 || ^5.0
outl1ne/nova-translatable Version ^2.0 || ^3.0
spatie/image Version ^3.0
spatie/image-optimizer Version ^1.7
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 iamgerwin/nova-media-hub contains the following files

Loading the files please wait ...