All Projects β†’ dcasia β†’ nova-filepond

dcasia / nova-filepond

Licence: MIT license
A Nova field for uploading File, Image and Video using Filepond.

Programming Languages

PHP
23972 projects - #3 most used programming language
Vue
7211 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nova-filepond

svelte-filepond
πŸ”Œ A handy FilePond adapter component for Svelte
Stars: ✭ 188 (+422.22%)
Mutual labels:  upload, filepond
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 (+2794.44%)
Mutual labels:  upload, multiple
uploadex
Elixir library for handling uploads with Ecto, Phoenix and Absinthe
Stars: ✭ 23 (-36.11%)
Mutual labels:  upload
MultiObjectTracker
Advanced multiple object tracker using dlib and OpenCV.
Stars: ✭ 56 (+55.56%)
Mutual labels:  multiple
hanami-shrine
Upload solution for Hanami using Shrine library
Stars: ✭ 28 (-22.22%)
Mutual labels:  upload
direct-upload-s3-signaturev4
Example of Directly uploading files to S3 with PHP
Stars: ✭ 50 (+38.89%)
Mutual labels:  upload
wp-graphql-upload
Upload support and functionality for WPGraphQL as specified by graphql-multipart-request-spec.
Stars: ✭ 26 (-27.78%)
Mutual labels:  upload
Regression
Multiple Regression Package for PHP
Stars: ✭ 88 (+144.44%)
Mutual labels:  multiple
gitup
Laravel package to upload git commits to server(s) via (s)ftp.
Stars: ✭ 20 (-44.44%)
Mutual labels:  upload
tiny-qiniu-request
tiny-qiniu for rc-upload or antd upload component `customRequest` property
Stars: ✭ 13 (-63.89%)
Mutual labels:  upload
file-upload
koa2 middleware support upload to cos/oss/obs/aws/local
Stars: ✭ 28 (-22.22%)
Mutual labels:  upload
windows-azure-storage
Use the Microsoft Azure Storage service to host your website's media files.
Stars: ✭ 48 (+33.33%)
Mutual labels:  upload
lambda-multipart-parser
This nodejs module will parse the multipart-form containing files and fields from the AWS lambda event object. It works very well parsing binary and text files.
Stars: ✭ 45 (+25%)
Mutual labels:  upload
slack-emoji-upload
Slack emoji uploader, CLI. single binary, no dependencies. linux, osx, windows.
Stars: ✭ 28 (-22.22%)
Mutual labels:  upload
multiple-windows
This project is a chrome extension. It provide to create windows to different sizes and multiple for front-end developers.
Stars: ✭ 16 (-55.56%)
Mutual labels:  multiple
media-command
Imports files as attachments, regenerates thumbnails, or lists registered image sizes.
Stars: ✭ 40 (+11.11%)
Mutual labels:  upload
react-native-tus-client
React Native client for the tus resumable upload protocol.
Stars: ✭ 38 (+5.56%)
Mutual labels:  upload
PHP-FileUpload
Simple and convenient file uploads β€” secure by default
Stars: ✭ 53 (+47.22%)
Mutual labels:  upload
apkup
πŸš€ Publish APKs to Google Play directly from the terminal
Stars: ✭ 33 (-8.33%)
Mutual labels:  upload
miniprogram-network
Redefine the Network API of Wechat MiniProgram (ε°η¨‹εΊη½‘η»œεΊ“)
Stars: ✭ 93 (+158.33%)
Mutual labels:  upload

Nova Filepond

Latest Version on Packagist Total Downloads License

Laravel Nova Filepond in action

A Nova field for uploading File, Image and Video using Filepond.

Installation

You can install the package via composer:

composer require digital-creative/nova-filepond

Usage

use DigitalCreative\Filepond\Filepond;

class Post extends Resource
{
    public function fields(Request $request)
    {
        return [
            // ...
            Filepond::make('Audio Example')
                    ->multiple() // the default is single upload, use this method to allow multiple uploads
                    ->limit(4) // limit the number of attached files
                    ->rules('required') // every validation rule works!!
                    ->mimesTypes([ 'audio/mp3', 'audio/ogg', 'audio/vnd.wav' ]) // if opmited, accepts anything
                    ->disk('public', '/optional/location') // the second argument instruct the file to be stored into a subfolder
                    ->storeAs(function (Illuminate\Http\File $file) { // this is optional, use in case you need generate custom file names
                        return Str::random(20) . '.' . $file->getExtension();
                    })

        ];

    }
}

When uploading multiple files you will need to cast the attribute to an array in your model class

class Post extends Model {
    
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'images' => 'array'
    ];

}

Adding an Image Editor

To enable image editing for your users you have to add the Doka Image Editor.

  1. Get a license for the editor and download the Doka library files.

  2. Publish the configuration file:

php artisan vendor:publish --provider="DigitalCreative\Filepond\FilepondServiceProvider" --tag="config"
  1. Set doka.enabled to true and update the path to the doka.min.js and doka.min.css library files.
'doka' => [
    'enabled' => true,
    'js_path' => public_path('doka.min.js'), // this assumes you places theses files within your public directory
    'css_path' => public_path('doka.min.css'),
]
  1. Two options are available to enable/disable Doka on a given field, ->withDoka($options) accepts a list of options, you can find the documentation of all possible options here: https://pqina.nl/doka/docs/patterns/api/doka-instance/#properties
public function fields(Request $request)
{
    return [
        //...

        Filepond::make('Avatar')->withDoka([
            'cropShowSize' => true
        ]),
        
        /**
         * This will disable Doka for this specific field
         */
        Filepond::make('Simple Image')->withoutDoka(),

    ];
}

If you've setup everything correctly you should see the edit icon on top of FilePond images.

Laravel Nova Filepond with Doka in action

License

The MIT License (MIT). Please see License File for more information.

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