Download the PHP package ahmed-aliraqi/laravel-media-uploader without Composer

On this page you can find all versions of the php package ahmed-aliraqi/laravel-media-uploader. 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-media-uploader

Laravel Media Uploader

Build Status StyleCI Total Downloads Latest Stable Version License

This package used to upload files using laravel-media-library before saving model.

Uploader

In this package all uploaded media will be processed.

  • All videos will converted to mp4.
  • All audios will converted to mp3.
  • All images width & height & ratio will be saved as custom property.
  • All videos & audios duration will be saved as custom property.

    Requirements

  • PHP >= 7.4
  • You should be ensured that the ffmpeg was installed on your server

Installation

The package will automatically register a service provider.

You need to publish and run the migration:

Publish laravel-media-library migrations:

If you want to customize attachments validation rules, you should publish the config file:

If you want to customize validation translations, you should publish the lang files:

This is the default content of the config file:

Use HasUploader trait in your model:

In your controller use addAllMediaFromTokens() method to assign the uploaded media to model using the generated tokens:

If you do not add any arguments in addAllMediaFromTokens() method will add all tokens in request('media') with any collection.

If you want to save specific collection name add it to the second argument.

Front End Basic Usage

Or Install Component Via NPM

Now you should register the component in your resources/js/app.js:

Usage

Attributes
Attribute Rule Type Description
media optional - default: [] array used to display an existing files
unlimited optional - default:false boolean upload unlimited files - if let it false will not be multiple select
max optional - default:12 int the maximum uploaded files - if 1 will not me multiple select
accept optional - default: * string the accepted mime types
form optional - default: false string the form id of the uploaded media
notes optional - default null string the help-block that will be displayed under the files
label optional - default null string the label of the uploader
collection optional - default default string the media library collection that the file will store in
tokens optional - default: [] array the recently uploaded files tokens, used to display recently uploaded files in validation case
max-width optional - default: 1200 string The maximum width of uploaded image
max-height optional - default: 1200 string The maximum height of uploaded image

Using with BsForm

This uploader support laravel-bootstrap-forms you can use the image custom component instead of vue html tag:

Note: do not forget to add Cron job in your server to remove the expired temporary media.

Note: Do not forget to store the csrf token in an HTML meta tag:

API


All versions of laravel-media-uploader with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
laravel/framework Version >=5.7
spatie/laravel-medialibrary Version ^9.0|^10.0
php-ffmpeg/php-ffmpeg Version ^1.0
laraeast/laravel-bootstrap-forms Version >=5.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 ahmed-aliraqi/laravel-media-uploader contains the following files

Loading the files please wait ....