PHPackages                             optimus/fineuploader-server - 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. optimus/fineuploader-server

ActiveLibrary

optimus/fineuploader-server
===========================

0.4.5(1y ago)724.7k↓36.4%11[5 issues](https://github.com/esbenp/fineuploader-server/issues)2MITPHPCI failing

Since Jul 16Pushed 1y ago2 watchersCompare

[ Source](https://github.com/esbenp/fineuploader-server)[ Packagist](https://packagist.org/packages/optimus/fineuploader-server)[ RSS](/packages/optimus-fineuploader-server/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (20)Used By (2)

Fineuploader Server
===================

[](#fineuploader-server)

[![Build Status](https://camo.githubusercontent.com/2cf97b136ea1b1e8137081a74517f37d91391855565ed762614837026a06ae46/68747470733a2f2f7472617669732d63692e6f72672f657362656e702f66696e6575706c6f616465722d7365727665722e737667)](https://travis-ci.org/esbenp/fineuploader-server) [![Coverage Status](https://camo.githubusercontent.com/fe1c0b6898e2c38fc3949ce2be06ee54705fe0bd437f3c6e030df87e953cb281/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f657362656e702f66696e6575706c6f616465722d7365727665722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/esbenp/fineuploader-server?branch=master)

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

[](#installation)

```
composer require optimus/fineuploader-server 0.3.*
```

Usage
-----

[](#usage)

This is basically some wrapper classes around [Fine Uploader's PHP server example](https://github.com/esbenp/fineuploader-server/blob/master/src/Vendor/FineUploader.php).

### 1. Publish/edit configuration

[](#1-publishedit-configuration)

If you are using Laravel you can integrate the uploader server by adding the service provider to your `config/app.php`

`config/app.php`

```
// ... other service providers
Optimus\FineuploaderServer\Provider\LaravelServiceProvider::class

```

Then publish the configuration

`php artisan vendor:publish`

### 2. Create routes and controller methods

[](#2-create-routes-and-controller-methods)

Somewhere in your routes file(s)

```
$router->post('/uploader/upload', '\Optimus\FineuploaderServer\Controller\LaravelController@upload');
$router->delete('/uploader/delete/{uuid}', '\Optimus\FineuploaderServer\Controller\LaravelController@delete');
$router->get('/uploader/session', '\Optimus\FineuploaderServer\Controller\LaravelController@session');

```

### 3. Upload

[](#3-upload)

This works fairly straight forward out of the box with fineuploader. I have not tried it with "vanilla" fineuploader but use the server with [fineuploader-client](https://github.com/esbenp/fineuploader-client)

Basically you send uploads to `POST /uploader/upload`. Delete using `DELETE /uploader/delete/{uuid}`. And repopulate the uploader using `GET /uploader/session`.

Configuration
-------------

[](#configuration)

When publishing assets you will publish `uploader.php` to your configs directory. It is already populated with some sensible defaults. If you wish for the uploader to generate thumbnails using the thumbnail creator middleware you have to install the package as well using.

```
composer require optimus/fineuploader-server-thumbnail-creator 0.1.*

```

You can also choose to use [Cloudinary](http://cloudinary.com/) as a storage backend. Here is an example of how your configuration could look like using a Cloudinary backend. Notice the thumbnail middleware is missing since the Cloudinary storage provider will add it automatically using Cloudinary.

`config/uploader.php`

```
