recca0120 / Upload
Licence: mit
Ajax Upload Large File Support jQuery-File-Upload, FileApi, Plupload, Dropzone Support framework Laravel 5
Stars: ✭ 76
Projects that are alternatives of or similar to Upload
Laravel Imageupload
Upload image using Laravel's build in function and resize it automatically.
Stars: ✭ 73 (-3.95%)
Mutual labels: laravel, upload
Laravel Ueditor
UEditor integration for Laravel.
Stars: ✭ 392 (+415.79%)
Mutual labels: laravel, upload
Laravel Filemanager Example 5.3
Demo integration for laravel-filemanager (https://github.com/UniSharp/laravel-filemanager).
Stars: ✭ 100 (+31.58%)
Mutual labels: laravel, upload
Laravel Filemanager
Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.
Stars: ✭ 1,688 (+2121.05%)
Mutual labels: laravel, upload
Aetherupload Laravel
A Laravel package to upload large files 上传大文件的Laravel扩展包
Stars: ✭ 835 (+998.68%)
Mutual labels: laravel, upload
Laravel Medialibrary
Associate files with Eloquent models
Stars: ✭ 4,743 (+6140.79%)
Mutual labels: laravel, upload
Youtube
Upload a video to a single YouTube channel with Laravel 5.
Stars: ✭ 143 (+88.16%)
Mutual labels: laravel, upload
Kbframe
一款基于Laravel框架开发的现代化二次开发框架,是高性能,高效率,高质量的企业级开发框架,具有驱动领域,敏捷开发,轻易上手,高内聚低耦合,开箱即用等特点。
Stars: ✭ 47 (-38.16%)
Mutual labels: laravel, upload
Transit
Easy file uploading and downloading for Laravel 5.
Stars: ✭ 5 (-93.42%)
Mutual labels: laravel, upload
Laravel Imageup
Auto Image & file upload, resize and crop for Laravel eloquent model using Intervention image
Stars: ✭ 646 (+750%)
Mutual labels: laravel, upload
Laravel Guided Image
Simplified and ready image manipulation for Laravel through intervention image.
Stars: ✭ 32 (-57.89%)
Mutual labels: laravel, upload
Laravel Simple Uploader
Simple file uploader for Laravel 5.
Stars: ✭ 59 (-22.37%)
Mutual labels: laravel, upload
Manager
Implementation of the Manager pattern existing in Laravel framework
Stars: ✭ 74 (-2.63%)
Mutual labels: laravel
Laravel Sqs Fifo Queue
Adds a Laravel queue driver for Amazon SQS FIFO queues.
Stars: ✭ 75 (-1.32%)
Mutual labels: laravel
Env Providers
👷 Load Laravel service providers based on your application's environment.
Stars: ✭ 73 (-3.95%)
Mutual labels: laravel
Form Object
Form object to use with Vue components for sending data to a Laravel application using axios.
Stars: ✭ 73 (-3.95%)
Mutual labels: laravel
Pure Ajax Upload And for Laravel 5 (Support jQuery-File-Upload, FileApi, Plupload)
Features
- Support Chunks jQuery-File-Upload $driver = 'fileapi';
- Support Chunks Dropzone $driver = 'dropzone';
- Support Chunks FileApi $driver = 'fileapi';
- Support Chunks Fine Uploader $driver = 'fine-uploader';
- Support Chunks Plupload $driver = 'plupload';
Installing
To get the latest version of Laravel Exceptions, simply require the project using Composer:
composer require recca0120/upload
Instead, you may of course manually update your require block and run composer update
if you so choose:
{
"require": {
"recca0120/upload": "^1.7"
}
}
Laravel 5
Include the service provider within config/app.php
. The service povider is needed for the generator artisan command.
'providers' => [
...
Recca0120\Upload\UploadServiceProvider::class,
...
];
publish
artisan vendor:publish --provider="Recca0120\Upload\UploadServiceProvider"
How to use
Controller
use Illuminate\Http\JsonResponse;
use Recca0120\Upload\UploadManager;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class UploadController extends Controller
{
public function upload(UploadManager $manager)
{
$driver = 'plupload'; // or 'fileapi'
$inputName = 'file'; // $_FILES index;
return $manager->driver($driver)->receive($inputName);
// or
return $manager
->driver($driver)
->receive($inputName, function (UploadedFile $uploadedFile, $path, $domain, $api) {
$clientOriginalName = $uploadedFile->getClientOriginalName();
$clientOriginalExtension = strtolower($uploadedFile->getClientOriginalExtension());
$basename = pathinfo($uploadedFile->getBasename(), PATHINFO_FILENAME);
$filename = md5($basename).'.'.$clientOriginalExtension;
$mimeType = $uploadedFile->getMimeType();
$size = $uploadedFile->getSize();
$uploadedFile->move($path, $filename);
$response = [
'name' => pathinfo($clientOriginalName, PATHINFO_FILENAME).'.'.$clientOriginalExtension,
'tmp_name' => $path.$filename,
'type' => $mimeType,
'size' => $size,
'url' => $domain.$path.$filename,
];
return new JsonResponse($response);
});
}
}
Factory
use Recca0120\Upload\Receiver;
use Illuminate\Http\JsonResponse;
require __DIR__.'/vendor/autoload.php';
$config = [
'chunks' => 'path_to_chunks',
'storage' => 'path_to_storage',
'domain' => 'http://app.dev/',
'path' => 'web_path'
];
$inputName = 'file';
$storagePath = 'relative path';
$api = 'fileapi'; // or plupload
Receiver::factory($config, $api)->receive($inputName)->send();
Standalone
use Recca0120\Upload\Receiver;
use Recca0120\Upload\FileAPI;
use Recca0120\Upload\Plupload;
use Illuminate\Http\JsonResponse;
require __DIR__.'/vendor/autoload.php';
$config = [
'chunks' => 'path_to_chunks',
'storage' => 'path_to_storage',
'domain' => 'http://app.dev/',
'path' => 'web_path'
];
$inputName = 'file';
$storagePath = 'relative path';
// if use Plupload, new Recca0120\Upload\Plupload
$receiver = new Receiver(new FileAPI($config));
// save to $config['base_path'].'/'.$storagePath;
$receiver->receive($inputName)->send();
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].