Download the PHP package maxkhim/laravel-storage-dedupler without Composer

On this page you can find all versions of the php package maxkhim/laravel-storage-dedupler. 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-storage-dedupler

Dedupler - Laravel package to prevent file duplications

Latest Version Laravel Downloads License

Stop storing duplicate files in your Laravel application.

Tired of seeing the same file stored multiple times? When users upload duplicates, your storage bloats, cloud bills grow, backups take longer, and data consistency suffers.

Dedupler is an elegant Laravel package that solves this once and for all. It automatically prevents file duplicates using SHA-1 hashing and provides a beautiful polymorphic API to manage your attachments.

✨ Why Dedupler?

πŸš€ Quick Start

1. Install via Composer

(Optional) Analyse legacy storage directory

Finds duplicate files by SHA1 hash in directory and subdirectories and calculate potential disk space savings

2. Init package

This command make all necessary migrations, and verifies application configuration (storage, models, etc.) to ensure the package is ready to use

πŸ”§ How to use

1. Use Facade Dedupler to Store Deduplicated files

2. Add Trait to Your Model to keep deduplicated files attached to models

About Deduplication

When you upload the same file multiple times:

3. Attach existing files to models by SHA1 hash

If you already know the SHA-1 hash of a file (e.g., from a previous upload or an API response), you can attach it directly to any model without re-uploading the file.

Note: The file must already exist in the Dedupler storage.

4. Detach unique files from models

Remove the association between a model and a file. The physical file remains in storage and is only deleted when no other models reference it (depending on your garbage collection settings).

Ecosystem

Dedupler is designed to integrate seamlessly with popular Laravel packages. Here are the integration:

🧹 Zero-Maintenance Cleanup (Enabled by Default)

You don't need cron jobs or manual scripts to keep your storage clean.

By default, Dedupler automatically deletes the physical file when the very last model detaches it. This guarantees you never pay for "ghost files" left behind after a user or post is deleted. If multiple models share the same file, it stays safely in storage until the last link is broken.

Prefer to handle cleanup manually via the dedupler:prune command? You can easily disable this auto-delete behavior via an environment variable:

🧹 Keeping Your Storage Lean

Deduplication is only half the battle. When you delete a model (like a Post or User), the physical file might remain in your storage, becoming an "orphan". Over time, these orphaned files silently eat up your disk space.

Dedupler ships with a powerful, garbage collector to keep your storage perfectly clean:

❀️ Support the Project

If Dedupler saved you disk space, cloud costs, or just a few hours of debugging, consider giving the repository a star ⭐. It’s the best way to show your appreciation and help other developers discover this package. Also, you can make an issue.

Featured In & Video Tutorials

πŸ›£οΈ API Reference

Enable RESTapi endpoint to check file existence

License

The MIT License (MIT).


All versions of laravel-storage-dedupler with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^10.0|^11.0|^12.0|^13.0
spatie/laravel-package-tools Version ^1.15.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 maxkhim/laravel-storage-dedupler contains the following files

Loading the files please wait ...