PHPackages                             triasrahman/media-upload - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. triasrahman/media-upload

AbandonedArchivedLibrary[File &amp; Storage](/categories/file-storage)

triasrahman/media-upload
========================

Simple and easy AJAX media upload for Laravel

v1.0.3(10y ago)366146[4 issues](https://github.com/triasrahman/laravel-media-upload/issues)MITPHPPHP &gt;=5.4.0

Since May 24Pushed 10y ago1 watchersCompare

[ Source](https://github.com/triasrahman/laravel-media-upload)[ Packagist](https://packagist.org/packages/triasrahman/media-upload)[ RSS](/packages/triasrahman-media-upload/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

Simple and Easy AJAX Media Upload for Laravel
=============================================

[](#simple-and-easy-ajax-media-upload-for-laravel)

[![Build Status](https://camo.githubusercontent.com/46a22635dd0385e5626d802c58cc72ad7ee73b319c402e4c7dd72c98ed9043e1/68747470733a2f2f7472617669732d63692e6f72672f74726961737261686d616e2f6c61726176656c2d6d656469612d75706c6f61642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/triasrahman/laravel-media-upload)[![Total Downloads](https://camo.githubusercontent.com/696b66d56e2d138dbd5b8aaa70e80c0f9b06b66aefd778f7a48e9e366624e154/68747470733a2f2f706f7365722e707567782e6f72672f74726961737261686d616e2f6d656469612d75706c6f61642f642f746f74616c2e737667)](https://packagist.org/packages/triasrahman/media-upload)[![Latest Stable Version](https://camo.githubusercontent.com/a6de66df0f0d21424a2decefd5e6bfb0f97086e67aecbc8a2895a9cc60dcc8a5/68747470733a2f2f706f7365722e707567782e6f72672f74726961737261686d616e2f6d656469612d75706c6f61642f762f737461626c652e737667)](https://packagist.org/packages/triasrahman/media-upload)[![License](https://camo.githubusercontent.com/4c1c81373a9c113b551ad20fa0dc65b1e6f40a5f775df747b3bbbfc17a43e436/68747470733a2f2f706f7365722e707567782e6f72672f74726961737261686d616e2f6d656469612d75706c6f61642f6c6963656e73652e737667)](https://packagist.org/packages/triasrahman/media-upload)

> **This is a package to make AJAX upload process easy and simple! Enhance your customer experience and improve your system performance.**

\###[SEE DEMO](http://laravel-media-upload.triasrahman.com)

Requirements
------------

[](#requirements)

- PHP &gt;=5.3
- [Intervention Image](https://github.com/Intervention/image) (for image processing)

Installation
------------

[](#installation)

Require this package with composer:

```
composer require triasrahman/media-upload

```

After updating composer, add the ServiceProvider to the providers array in config/app.php

```
'providers' => [
	//	...
	'Triasrahman\MediaUpload\MediaUploadServiceProvider',
]

```

Copy the package config to your local config with the publish command:

```
php artisan vendor:publish

```

Usage
-----

[](#usage)

Your HTML form

```

```

Using jQuery AJAX

```
$('input[name=file]').change(function()
{
	// AJAX Request
	$.post( '/media-upload', {file: $(this).val()} )
		.done(function( data )
		{
			if(data.error)
			{
				// Log the error
				console.log(error);
			}
			else
			{
				// Change the image attribute
				$( 'img.preview' ).attr( 'src', data.path );
			}
		});
});
```

Configurations
--------------

[](#configurations)

Edit `media-upload.php` for more configurations.

```
/*
 |--------------------------------------------------------------------------
 | Upload Types
 |--------------------------------------------------------------------------
 |
 | It's the flexibility of this package. You can define the type of upload
 | file methods. For example, you want to upload for profile picture,
 | article post, background, etc. Here is
 |
 */

'types' => [
	// ... put your custom type ...

	'profile' => [
		'middleware' => 'auth',
		'format' => 'image',
		'image' => [
			'fit' => [400, 400],
			'thumbs' => [
				'small' => [50, 50],
				'medium' => [100, 100],
			]
		],
		'save_original' => true,
	],

	'profile-cover' => [
		'middleware' => 'auth',
		'format' => 'image',
		'image' => [
			'fit' => [1200, 400],
		],
		'multiple' => false,
	],

	'media' => [
		'middleware' => 'auth',
		'format' => 'image|video|audio',
		'image' => [
			'thumbs' => [
				'small' => [50, 50],
				'medium' => [100, 100],
			]
		],
		'multiple' => true,
	],

],
```

Front-end Integration
---------------------

[](#front-end-integration)

Coming Soon

License
-------

[](#license)

Laravel Media Upload is licensed under the [MIT License](http://opensource.org/licenses/MIT).

Copyright 2015 [Trias Nur Rahman](http://triasrahman.com/)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

4

Last Release

3993d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a335aab605be4ff31461271c3a87878dcc24fd396184b12b77aaae5505f21d61?d=identicon)[triasrahman](/maintainers/triasrahman)

---

Top Contributors

[![triasrahman](https://avatars.githubusercontent.com/u/7110859?v=4)](https://github.com/triasrahman "triasrahman (11 commits)")

---

Tags

laravelimagefilemediauploadajax

### Embed Badge

![Health badge](/badges/triasrahman-media-upload/health.svg)

```
[![Health](https://phpackages.com/badges/triasrahman-media-upload/health.svg)](https://phpackages.com/packages/triasrahman-media-upload)
```

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
