Download the PHP package blalmal10a/free-upload without Composer

On this page you can find all versions of the php package blalmal10a/free-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 free-upload

FreeUpload

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

A Filament v4/v5 file upload form component that uploads files directly to an external image hosting API over XMLHttpRequest (with real upload progress), stores plain URL strings in your model, and serves those files back through the plugin's own PHP proxy (fetch from the image host, PXVT-decode on demand).

Installation

Publish the config file:

Configuration

All options are environment-driven:

Key Env Default Purpose
upload_endpoint FREEUPLOAD_UPLOAD_ENDPOINT null → plugin route freeupload.upload user-defined upload endpoint (URL, path, or route name)
proxy_base_url FREEUPLOAD_PROXY_BASE_URL null → the app's own routes base URL of the proxy that serves stored files
image_path FREEUPLOAD_IMAGE_PATH images path segment for raw image streaming (no decode)
files_path FREEUPLOAD_FILES_PATH files path segment for PXVT-decoded files
upload_host FREEUPLOAD_UPLOAD_HOST https://freeimage.host/api/1/upload upstream hosting API
api_key FREEUPLOAD_API_KEY '' upstream API key
max_size_kb FREEUPLOAD_MAX_SIZE_KB 32768 upload validation cap
max_encoded_file_mb FREEUPLOAD_MAX_ENCODED_FILE_MB 30 client-side cap for encoded non-image uploads
image_host FREEUPLOAD_IMAGE_HOST https://iili.io image host the proxy fetches files from
proxy_timeout FREEUPLOAD_PROXY_TIMEOUT 10 upstream fetch timeout (seconds)
register_routes FREEUPLOAD_REGISTER_ROUTES true register the plugin's upload and file routes
route_prefix FREEUPLOAD_ROUTE_PREFIX freeupload route prefix
route_middleware FREEUPLOAD_ROUTE_MIDDLEWARE ['web', 'auth'] route middleware

Set FREEUPLOAD_API_KEY in your .env file:

Upload endpoint

upload_endpoint accepts:

When unset, the plugin's own POST /freeupload/upload route (named freeupload.upload) is used.

Serving files (the proxy)

The plugin registers two GET routes under the route prefix (when register_routes is enabled):

Stored URLs point at these routes by default (proxy_base_url unset), e.g. https://your-app.com/freeupload/images/abc123.png/photo.png. Set FREEUPLOAD_PROXY_BASE_URL to serve them from an external proxy instead; the same /images and /files path structure is used on the external base.

Usage

The component extends Filament's FileUpload, so all regular options work (->image(), ->maxSize(), ->reorderable(), ...). The uploaded value is a URL string (or an array of URL strings when ->multiple()).

The upload endpoint is configured globally via env/config (FREEUPLOAD_UPLOAD_ENDPOINT / upload_endpoint) — it is deliberately not overridable per component, so every form field uploads to the same endpoint.

Additional per-component options:

How uploads work

  1. The user picks a file. If it is a non-image file and fits within max_encoded_file_mb, the browser PXVT-encodes it into a PNG on a canvas and uploads that; images are uploaded raw.
  2. The upload is sent via XMLHttpRequest with progress reporting to the component's endpoint (by default the plugin's own POST /freeupload/upload route, validated and forwarded to your upload_host).
  3. The endpoint responds with {"url": "..."} — a URL served by the proxy ({base}/{image_path}/{id}/{filename} for images, {base}/{files_path}/{id}/{filename} for encoded files).
  4. The URL is written back into the Livewire state and rendered into the component on re-visit; the proxy serves the file and decodes PXVT payloads on demand.

[!NOTE] Stored URL strings are client-controllable values. Treat them as untrusted when the field is editable by non-admin users.

Publishing & customizing the component

You can publish the FreeUpload component stub into your application and take full ownership of it:

This writes the component to app/Forms/Components/FreeUpload.php with the namespace App\Forms\Components (override with --namespace=):

The raw stub can also be copied via php artisan vendor:publish --tag="free-upload-component" (the {{ namespace }} placeholder then needs to be replaced manually).

To use your copy instead of the package's:

The published copy is a snapshot — upgrades to the package won't touch it. The component keeps using the package's config keys and routes unless you override them, so a published copy only changes how the component renders and uploads.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

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

License

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


All versions of free-upload with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-gd Version *
filament/filament Version ^4.0 || ^5.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 blalmal10a/free-upload contains the following files

Loading the files please wait ...