Nova Ckeditor
  • 🏁Getting Started
    • Introduction
    • Installation
    • Support Us
    • License
    • Demo
  • 🚀Basic Usage
    • Usage
    • Notes
  • ⚙️Advanced Usage
    • Customize ImageStorage
    • Integrating NovaFileArtisan (Larupload) with Image Resource
    • Customize AudioStorage
    • Customize FileStorage
    • Multiple Toolbars
    • Customize Toolbar Items
    • Media Embed
    • CkEditor Field Options
      • Toolbar
      • Height
      • Limit On Index
      • Content Language
      • Force Paste as Plain Text
      • Alert Before Unsaved Changes
      • Text Part Language
      • General HTML Support
      • Group Items In Overflow Mode
      • Image Browser
      • Audio Browser
      • Video Browser
      • File Browser
      • Snippets
    • Configuration
      • Video Model
      • Image Model
      • Memory
      • Max Image Quality
      • Image Max Width
      • Image Max Height
      • Image Naming Method
      • Image Processing Library
      • Audio Naming Method
      • File Naming Method
      • Toolbars
        • Default Toolbar
        • Toolbar 1
          • Height
          • Items
          • Options
          • Content Lang
          • Force Paste as Plain Text
          • Alert Before Unsaved Changes
          • UI Language
            • UI Language Name
            • UI Language Script
          • Text Part Language
          • General HTML Support
          • Group Items In Overflow Mode
          • Image Browser
          • Audio Browser
          • Video Browser
          • File Browser
          • Insert Image Types
          • Insert Image Size
          • Snippets
  • ⚪Other
    • Migration
    • Credit and Thanks
Powered by GitBook
On this page
Edit on GitHub
  1. Advanced Usage

Customize FileStorage

You have the option to override the FileStorage service by binding your own extended version using the following code snippet:

use Illuminate\Http\Request;
use Mostafaznv\NovaCkEditor\FileStorage;

class MyFileStorage extends FileStorage
{
    public function __invoke(Request $request)
    {
        // TODO: Change the default implementation.
    }
}

$this->app->bind('ckeditor-file-storage', MyFileStorage::class);

By creating a custom MyFileStorage class that extends FileStorage, you can define your own logic for handling file storage within the __invoke() method. Afterward, binding the custom class to the 'ckeditor-file-storage' key allows Laravel Nova to use your extended implementation instead of the default one.

Within the __invoke() method of MyFileStorage, you can implement your desired functionality to handle file storage according to your specific requirements.

This feature was introduced in version 7.3.0 of the NovaCKEditor

PreviousCustomize AudioStorageNextMultiple Toolbars

Last updated 5 months ago

⚙️