Download the PHP package happenv-com/filament-multi-source-upload without Composer

On this page you can find all versions of the php package happenv-com/filament-multi-source-upload. 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 filament-multi-source-upload

Filament Multi-Source Upload

![Filament Multi-Source Upload](art/banner.png)

Latest Version Tests PHPStan Quality Total Downloads License

A drop-in replacement for Filament's FileUpload field that lets users add a file from their disk or from a URL — and in both cases the file is downloaded and stored on your target disk, exactly as if it had been uploaded.

No second *_url column, no remote references to babysit. One column, one file, always on your storage.

Why

Most "upload from URL" components store the link in a separate column (image or image_url) and leave the file on someone else's server. The moment that URL rots, moves, or blocks hotlinking, your data is gone.

MultiSourceFileUpload takes the opposite approach: a pasted URL is fetched server-side, turned into a real Livewire temporary upload, and then flows through Filament's own save pipeline. The result is byte-for-byte identical to a drag-and-drop upload — same disk, same directory, same visibility, same filename strategy, same single string column.

Key features

Requirements

Package Versions
PHP 8.4, 8.5
Laravel 13
Filament 4 (^4.12.0), 5 (^5.7.0)
Livewire 3 (Filament 4), 4 (Filament 5)

Installation

Install the package via Composer:

The service provider is auto-discovered and the field's stylesheet is registered as a Filament asset — that's it, the field is ready to use. It does not use Tailwind utility classes of its own, so your panel theme needs no extra @source line.

Configuration

In addition to the full FileUpload API, the field adds:

Method Default Description
urlImport(bool \| Closure) true Enable/disable the From URL tab. When false, the field behaves like a plain FileUpload.
allowPrivateNetworks(bool \| Closure) false Allow importing from private/loopback/link-local addresses (relaxes the SSRF guard).
maxUrlImportSize(int \| Closure \| null) maxSize() or 25 MB Hard cap (in kilobytes) for URL downloads.
fileTabLabel(string \| Closure \| null) translated Label of the File tab.
urlTabLabel(string \| Closure \| null) translated Label of the From URL tab.

Publishing views & translations

To customise the tab labels, placeholders or error messages, or the view, publish them:

The label and source switch reuse Filament's own component classes and design tokens, so they match the active panel theme (including dark mode) with no extra configuration.

Usage

Uploading a file or importing it from a URL

Use it anywhere you would use FileUpload. Every FileUpload method works unchanged, because it is a FileUpload:

The field renders a compact File / From URL switch beside the label. On From URL the user pastes a link and clicks Import: the file is fetched server-side (SSRF/size guarded) and handed to the field's own uploader, so it appears in the dropzone as a normal upload — thumbnail, type/size validation, progress bar, remove button and all — and saves exactly like a dragged-in file.

Dropping a link or an image from another tab

Dragging an image (or a link) out of another browser tab and dropping it anywhere on the field imports it from its URL — the same server-side fetch as the From URL pane, no click needed. The browser attaches a File to such a drag too, but that file is named after the URL's last segment (often just image, no extension) and typed after whatever the page served, so FilePond would refuse it; the import sniffs the real type from the bytes and names the file properly. Files dragged in from disk carry no URL and go straight to FilePond as before.

Multiple files

Disabling URL import conditionally

How it works

  1. The user pastes a URL and clicks Import.
  2. The file is downloaded server-side (with SSRF, size and timeout guards) and its bytes are handed back to the browser.
  3. The browser rebuilds a real File and feeds it to the field's FilePond instance via addFile() — so from that point it is indistinguishable from a file the user dragged in: FilePond validates it (type/size), previews it, uploads it to Livewire's temporary storage and, on submit, Filament promotes it onto the configured disk.

Because the URL and the local file converge on the exact same uploader, the imported file honours every setting you already use: disk(), directory(), visibility(), acceptedFileTypes(), maxSize(), getUploadedFileNameForStorageUsing(), storeFileNamesIn(), image editing, and so on — with no duplicated logic.

Instant preview

The moment the user clicks Import, the file drops into the dropzone as a live upload item — image/video/audio thumbnails render immediately, other types (PDF, ZIP, …) show as a named file entry — with an upload progress bar and a remove button, just like a local upload.

Security

Fetching a user-supplied URL server-side is an SSRF vector, so the download is guarded by default:

As with any FileUpload, always call acceptedFileTypes() (or image()) with an explicit type list when files land on a public, PHP-executing disk.

If your server sends outgoing HTTP through a proxy, the proxy connects to the target, so the address checks are only as strong as the proxy's own rules.

Translations

The field ships in every locale Filament ships:

am ar az bg bn bs ca ckb cs da de el en es et eu fa fi fil fr he hi hr hu hy id it ja ka km ko ku lt lus lv mk mn ms my nb ne nl pl pt pt_BR ro ru sk sl sq sr_Cyrl sr_Latn sv sw tg th tr uk ur uz vi zh_CN zh_HK zh_TW

Publish them with php artisan vendor:publish --tag="filament-multi-source-upload-translations" to change the wording or add a language. tests/Unit/TranslationsTest.php checks that every locale has exactly the keys English has, and that every locale Filament ships has a translation.

Development

The compiled stylesheet in resources/dist/ is committed, so installing the package needs no build step. It is authored with Tailwind (@apply) in resources/css/index.css and only emits the component's own rules (Filament's theme is pulled in via @reference, so no base styles are duplicated). The build reads that theme from vendor/, so install the Composer dependencies first. After changing resources/css, rebuild and commit the result — CI refuses outdated assets:

Upgrading

Breaking changes and how to migrate are described in UPGRADING for every major version.

Changelog

See CHANGELOG and GitHub releases for what has changed recently.

Contributing

See CONTRIBUTING for details.

Security vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). See License File for more information.



All versions of filament-multi-source-upload with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
composer-runtime-api Version ^2.2
filament/filament Version ^4.12.0 || ^5.7.0
livewire/livewire Version ^3.7 || ^4.0
spatie/laravel-package-tools Version ^1.14
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 happenv-com/filament-multi-source-upload contains the following files

Loading the files please wait ...