File manager module for the Lumen PHP framework.

Overview

Lumen File Manager

Code Climate Scrutinizer Code Quality StyleCI Latest Stable Version Total Downloads License

File manager module for the Lumen PHP framework.

Please note that this module is still under active development.

NOTE: Branch 5.1 is for using Lumen Framework 5.1 and 5.2. Only bug fixes for 1.1.X should be tagged here.

Requirements

Usage

Installation

Run the following command to install the package through Composer:

composer require nordsoftware/lumen-file-manager

Bootstrapping

Please note that we only support Doctrine for now, but we plan to add Eloquent support soon.

Add the following lines to bootstrap/app.php:

$app->register('Nord\Lumen\FileManager\Doctrine\ORM\DoctrineServiceProvider'); // For ORM
// $app->register('Nord\Lumen\FileManager\Doctrine\ODM\DoctrineServiceProvider'); // For ODM
$app->register('Nord\Lumen\FileManager\FileManagerServiceProvider');

Add base_path('vendor/nordsoftware/lumen-file-manager/src/Doctrine/ORM/Resources') to your Doctrine mapping paths.

For ODM, add base_path('vendor/nordsoftware/lumen-file-manager/src/Doctrine/ODM/Resources').

You can now use the FileManager facade or inject the Nord\Lumen\FileManager\Contracts\FileManager where needed.

Example

Below is an example of how to use this module to save a file from the request and return a JSON response with the saved file's ID and URL.

public function uploadFile(Request $request, FileManager $fileManager)
{
    $file = $fileManager->saveFile($request->file('upload'));

    return Response::json([
        'id' => $file->getId(),
        'url' => $fileManager->getFileUrl($file),
    ]);
}

Contributing

Please read the guidelines.

License

MIT. See LICENSE.

You might also like...
ORM-based file upload package for php.

#Stapler Note: If you've previously been using this package, then you've been using it with Laravel. This package is no longer directly coupled to the

Detects file type by filename or content and generates correct mimetype.

FileTypeDetector Files type detector based on file name extension or file content (binary content). Usage Installation Supported formats Usage File Ty

Uguu is a simple lightweight temporary file host with support for drop, paste, click and API uploading.

Uguu What is Uguu? Uguu is a simple lightweight temporary file hosting and sharing platform, but can also be used as a permanent file host. Features O

🛬🧾 A PHP8 TacView ACMI file format parser

A PHP8 TacView ACMI file format parser This package offers parsing support for TacView ACMI flight recordings version 2.1, it follows the standard des

Creating a file uploader with Laravel
Creating a file uploader with Laravel

File-Uploader File uploader is a simple group of restful APIs built in Laravel to upload file into a server and remove the file from that server. Tool

 Basic anonymous and registered upload storage for temporary share file self hosted.
Basic anonymous and registered upload storage for temporary share file self hosted.

TMPShareX Basic anonymous and registered upload storage for temporary share file self hosted. Server Requirement PHP 7.4.8 [Support PHP 8] Nginx 1.19.

Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.
Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.

Documents ・ Installation ・ Integration ・ Config ・ Customization ・ Events ・ Upgrade ・ Demo ・ FAQ Features File upload and management Uploading validati

Simple file uploading, Pomf like

Pomf-0x80 Simple file uploading, Pomf like. Features One click uploading, no registration required IPFS Upload + Pin A minimal, modern web interface D

Private file storage and share with user build with laravel and vue inspired by google drive
Private file storage and share with user build with laravel and vue inspired by google drive

LaravelDrive is a file storage system that allows store private file and share with users build wiht laravel and vue inspired by google drive. Laravel

Comments
  • Add support for Lumen 5.4

    Add support for Lumen 5.4

    This module should be made compatible with Lumen 5.4.

    For example on line https://github.com/nordsoftware/lumen-file-manager/blob/develop/src/FileManagerServiceProvider.php#L91 $container->make is given 2 arguments but in Lumen 5.4 the method only accepts 1. This results in

    Unresolvable dependency resolving [Parameter #0 [ <required> array $config ]] in class Nord\\Lumen\\FileManager\\Adapters\\DiskAdapter
    

    This is documented in https://laravel.com/docs/5.4/upgrade under "make Method Parameters".

    There might be other things to update too.

    opened by jukump 2
  • Support for S3 Pre-Signed URL

    Support for S3 Pre-Signed URL

    Add support for getting a file's pre-signed URL to S3: https://docs.aws.amazon.com/aws-sdk-php/v3/guide/service/s3-presigned-url.html

    Should be applied to the S3Adapter.

    enhancement Hacktoberfest 
    opened by soderluk 1
  • Default adapters cause file saving to fail if all adapters are not setup

    Default adapters cause file saving to fail if all adapters are not setup

    Commenting out S3 and Cloudinary adapters from FileManagerServiceProvider.php $defaultAdapters fixes this. Otherwise you get a League\Flysystem error where it tries to create an adapter but cannot because it doesn't have enough config data.

    Fix would be to make local adapter the only default one. Now the default adapters config is merged with defined adapter config which doesn't remove the default ones if they don't exist.

    opened by laxu 1
  • Add unit tests

    Add unit tests

    Codeception recommended.

    Run tests on Travis CI.

    Bonus points for code coverage (possibly via Code Climate).

    See https://github.com/nordsoftware/lumen-cors for reference.

    Hacktoberfest 
    opened by hugovk 0
Owner
Digia
We share the passion for writing great code.
Digia
kodbox is a file manager for web. It is a newly designed product based on kodexplorer.

kodbox is a file manager for web. It is a newly designed product based on kodexplorer. It is also a web code editor, which allows you to develop websites directly within the web browser.You can run kodbox either online or locally,on Linux, Windows or Mac based platforms

warlee 1.2k Jan 7, 2023
A web based file manager,web IDE / browser based code editor

KodExplorer Update to kodbox: https://github.com/kalcaddle/kodbox Download | Demo It is recommended to use a new design upgrade product:kodbox 该项目处于维护

warlee 5.8k Jan 3, 2023
A lightweight file manager with full ShareX, Screencloud support and more

XBackBone is a simple, self-hosted, lightweight PHP file manager that support the instant sharing tool ShareX and *NIX systems. It supports uploading

Sergio Brighenti 751 Jan 8, 2023
FIle Uploader is a php package to aid fast , easy and safe file upload

FILE UPLOADER FIle Uploader is a php package to aid fast , easy and safe file upload installation composer require codad5/file-helper Features Fast an

Aniezeofor Chibueze Michael 2 Sep 3, 2022
A "Vuejs & Laravel" Media Manager With Tons of Features

Laravel Media Manager Installation Config Features Events Usage Installation composer require ctf0/media-manager publish the package assets with php a

Muah 783 Dec 29, 2022
Watch changes in the file system using PHP

Watch changes in the file system using PHP This package allows you to react to all kinds of changes in the file system. Here's how you can run code wh

Spatie 170 Dec 25, 2022
Upload File Library For PHP ( Simple & Easy User )

Upload File Library For Backend/ServerSide PHP ( Simple & Easy For Use ), Support Multiple Upload

Lamhot Simamora 1 Oct 12, 2021
Gotipath Storage is a file storage library for PHP. It provides one interface to interact with FTP/SFTP.

Gotipath Storage is a file storage library for PHP. It provides one interface to interact with FTP/SFTP. When you use this package, you're protected from vendor lock-in, That mean you can connect to any FTP/SFTP storage. Also it's comes with base URL option to connect Gotipath CDN.

Gotipath 2 Nov 3, 2021
PHPProject is a library written in pure PHP that provides a set of classes to write to different project management file formats

PHPProject PHPProject is a library written in pure PHP that provides a set of classes to write to different project management file formats, i.e. Micr

PHPOffice 192 Dec 17, 2022