Laravel Upload File Manager: Manage the upload of public and private files

Recommend this page to a friend!
  Info   Documentation   View files (13)   Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-05-11 (2 months ago) Not yet rated by the usersTotal: 80 This week: 1All time: 9,567 This week: 255
Version License PHP version Categories
laravel-uploader 1.0.0Custom (specified...5HTTP, PHP 5, Files and Folders
Description Author

This package can manage the upload of public and private files.

It can handle file uploads by storing the files in local directory or a remote directory in Amazon S3.

The package can also associate file ownership to a given Laravel application user, with the possibility to restrict the access until a given date, as well forbid certain user to access a given file.

Innovation Award
PHP Programming Innovation award nominee
May 2020
Number 8
Many sites need to allow users to upload files to be shared with other users either publicly or privately.

Access control may also need to be personalized, so only a set of users may access those uploaded files.

This package provides a solution, that can not only restrict the access of files to certain users, but can also restrict the period of time that the files remain accessible until a specific date.

Manuel Lemos
Picture of Moamen Eltouny
  Performance   Level  
Name: Moamen Eltouny <contact>
Classes: 11 packages by
Country: Egypt Egypt
Innovation award
Innovation award
Nominee: 5x

Details

[RaggiTech] Laravel >= 6.0 - Uploader.

Latest Stable Version Total Downloads License

Laravel Uploader provides a quick and easy methods to upload files and handling visibility with simple routing.

Install

Install the latest version using Composer:

$ composer require raggitech/laravel-uploader

then publish the migration & config files

$ php artisan vendor:publish --tag=laravel-uploader
$ php artisan migrate

Usage

<a name="config"></a>

Configurations / Options

/
*	prefix 		=> Hash Prefix
*	visitable	=> Visits Counter
*	private		=> Only Permitted Users
*/

<a name="UG"></a>

Uploading & Getting

function upload(UploadedFile $file, array $options = [])
function getUpload(string $hash)

// Upload File
$file = upload($request->image, [
	'visitable'	=> true
]);

// Getting Uploaded File with Hash code
$file = getUploaded('5e63885fa771d1.12185481920ncF3...');

// Information
echo $file->hash; // File's Hash
echo $file->name; // File's Name
echo $file->path; // File's Path
echo $file->size; // File's Size in Bytes
echo $file->readableSize(); // File's Readable Size
echo $file->extension; // File's Extension
echo $file->mime; // File's MIME

echo $file->visits; // File's visits (Visitable File)

<a name="URL_UP"></a>

URL & Uploader

echo $file->url(); // Getting Uploaded File's URL
// <img src"{{ $file->url() }}" alt="{{ $file->name }}">

$user = $file->uploader; // Getting Uploader's Model

<a name="dd"></a>

Deleting Uploaded File

$file->delete();

<a name="permits"></a>

Permits (Private File)

$permits = $file->permits; // Getting Permits List
$permitted = $file->isPermitted($user); // Checking if permitted (App\User)

$file->permit($user, '2021-02-01'); // Permitting a user
$file->forbid($user); // Forbidding a user

License

MIT license

  Files  
File Role Description
src (6 files, 3 directories)
composer.json Data Auxiliary data
LICENSE Lic. License text
README.md Doc. Documentation

  Files  /  src  
File Role Description
config (1 file)
Controller (1 file)
database (1 directory)
   File.php Class Class source
   Helpers.php Example Example script
   routes.php Class Class source
   Upload.php Class Class source
   UploaderServiceProvider.php Class Class source
   UploadPermit.php Class Class source

  Files  /  src  /  config  
File Role Description
   uploader.php Conf. Configuration script

  Files  /  src  /  Controller  
File Role Description
   UploadController.php Class Class source

  Files  /  src  /  database  
File Role Description
migrations (2 files)

  Files  /  src  /  database  /  migrations  
File Role Description
   uploads.stub Class Class source
   upload_permits.stub Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:80
This week:1
All time:9,567
This week:255

For more information send a message to info at phpclasses dot org.