All Projects → siriusphp → Upload

siriusphp / Upload

Licence: mit
Framework agnostic upload handler library

Projects that are alternatives of or similar to Upload

Express Fileupload
Simple express file upload middleware that wraps around busboy
Stars: ✭ 1,069 (+401.88%)
Mutual labels:  upload, forms, file-upload
Cj Upload
Higher order React components for file uploading (with progress) react file upload
Stars: ✭ 589 (+176.53%)
Mutual labels:  upload, file-upload
Uploadcare Widget
Uploadcare Widget, an ultimate tool for HTML5 file upload supporting multiple file upload, drag&drop, validation by file size/file extension/MIME file type, progress bar for file uploads, image preview.
Stars: ✭ 183 (-14.08%)
Mutual labels:  upload, file-upload
Meteor Files
🚀 Upload files via DDP or HTTP to ☄️ Meteor server FS, AWS, GridFS, DropBox or Google Drive. Fast, secure and robust.
Stars: ✭ 1,033 (+384.98%)
Mutual labels:  upload, file-upload
Phpmussel
PHP-based anti-virus anti-trojan anti-malware solution.
Stars: ✭ 337 (+58.22%)
Mutual labels:  upload, file-upload
React Uploady
Modern file uploading - components & hooks for React
Stars: ✭ 372 (+74.65%)
Mutual labels:  upload, file-upload
Fileup
FileUp - JQuery File Upload
Stars: ✭ 10 (-95.31%)
Mutual labels:  upload, file-upload
kipp
A flexible file storage server
Stars: ✭ 33 (-84.51%)
Mutual labels:  upload, file-upload
Tus Java Server
Library to receive tus v1.0.0 file uploads in a Java server environment
Stars: ✭ 64 (-69.95%)
Mutual labels:  upload, file-upload
Linx Server
Self-hosted file/code/media sharing website. ~~~~~~~~~~~~~~~~~~~ Demo: https://demo.linx-server.net/
Stars: ✭ 1,044 (+390.14%)
Mutual labels:  upload, file-upload
image-uploader
Simple Drag & Drop image uploader plugin to static forms, without using AJAX
Stars: ✭ 70 (-67.14%)
Mutual labels:  upload, file-upload
Direct Upload
Composer Package to Direct Upload to S3
Stars: ✭ 84 (-60.56%)
Mutual labels:  upload, file-upload
vue-simple-upload-component
A simple upload component for Vue.js 2.x
Stars: ✭ 14 (-93.43%)
Mutual labels:  upload, file-upload
Pomf
Simple file uploading and sharing
Stars: ✭ 535 (+151.17%)
Mutual labels:  upload, file-upload
yii2-dropzone
This extension provides the Dropzone integration for the Yii2 framework.
Stars: ✭ 11 (-94.84%)
Mutual labels:  upload, file-upload
Chibisafe
Blazing fast file uploader and awesome bunker written in node! 🚀
Stars: ✭ 657 (+208.45%)
Mutual labels:  upload, file-upload
rustypaste
A minimal file upload/pastebin service.
Stars: ✭ 102 (-52.11%)
Mutual labels:  upload, file-upload
SimpleBatchUpload
Allows for basic, no-frills uploading of multiple files
Stars: ✭ 15 (-92.96%)
Mutual labels:  upload, file-upload
Uploader
A lightweight and very configurable jQuery plugin for file uploading using ajax(a sync); includes support for queues, progress tracking and drag and drop.
Stars: ✭ 1,042 (+389.2%)
Mutual labels:  upload, forms
Uploadcare Php
PHP API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
Stars: ✭ 77 (-63.85%)
Mutual labels:  upload, file-upload

Sirius\Upload

Source Code Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

Framework agnostic upload handler library.

Features

  1. Validates files agains usual rules: extension, file size, image size (wdith, height, ratio). It uses Sirius Validation for this purpose.
  2. Moves valid uploaded files into containers. Containers are usually local folders but you can implement your own or use other filesystem abstractions like Gaufrette or Flysystem.
  3. Works with PSR7 UploadedFileInterface objects and with Symfony's UploadedFiles (see integrations).

Used by Bolt CMS

Elevator pitch

use Sirius\Upload\Handler as UploadHandler;
$uploadHandler = new UploadHandler('/path/to/local_folder');

// validation rules
$uploadHandler->addRule('extension', ['allowed' => ['jpg', 'jpeg', 'png']], '{label} should be a valid image (jpg, jpeg, png)', 'Profile picture');
$uploadHandler->addRule('size', ['max' => '20M'], '{label} should have less than {max}', 'Profile picture');

$result = $uploadHandler->process($_FILES['picture']); // ex: subdirectory/my_headshot.png

if ($result->isValid()) {
	// do something with the image like attaching it to a model etc
	try {
		$profile->picture = $result->name;
		$profile->save();
		$result->confirm(); // this will remove the .lock file
	} catch (\Exception $e) {
		// something wrong happened, we don't need the uploaded files anymore
		$result->clear();
		throw $e;
	}
} else {
	// image was not moved to the container, where are error messages
	$messages = $result->getMessages();
}

##Links

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].