Search by

kukrik / qcubed-filemanager

kukrik

QCubed-4 plugin for FileManager

Package info

github.com/kukrik/qcubed-filemanager

Language:JavaScript

Type:qcubed-library

pkg:composer/kukrik/qcubed-filemanager

Statistics

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2026-11-03 07:56 UTC

This package is auto-updated.

Last update: 2026-11-03 07:56:29 UTC


README

A file management solution built specifically for the QCubed-4 framework.

This plugin centralizes all uploaded files into a single location while automatically generating and maintaining derived image versions for efficient usage.

โš ๏ธ This is not a generic PHP file manager. It is designed specifically for QCubed-4.

โœจ Features

  • Chunk upload (large file support)

  • Regular upload (fallback mode)

  • Automatic image resizing:

    • large (max 1500px)
    • medium (max 480px)
    • thumbnail (max 320px)
  • WEBP support (GD-based)

  • File usage locking system (green / red / yellow indicators)

  • Multi-select file handling

  • Drag selection (mouse-based selection of multiple rows)

  • Toolbar-based file operations:

    • Rename
    • Crop
    • Copy
    • Move
    • Delete
    • Download
  • Breadcrumb navigation

  • Quick search

  • Multiple views:

    • ImageListView
    • ListView
    • BoxView
  • CKEditor integration

  • MediaFinder integration

  • Database-backed file metadata

๐Ÿงฑ Architecture

The FileManager uses a predictable and maintainable structure:

upload/           โ†’ original files (source of truth)

tmp/_files/
    โ”œโ”€โ”€ large/       โ†’ resized images (โ‰ค1500px)
    โ”œโ”€โ”€ medium/      โ†’ resized images (โ‰ค480px)
    โ”œโ”€โ”€ thumbnail/   โ†’ resized images (โ‰ค320px)
    โ”œโ”€โ”€ temp/        โ†’ temporary chunk upload files
    โ””โ”€โ”€ zip/         โ†’ temporary archives for download

Principles

  • All original files are stored in one central location
  • Resized files are generated separately
  • Temporary folders must remain empty outside processing
  • File operations stay synchronized across directories

๐Ÿ–ผ Image handling

Uploaded images are automatically resized:

Folder Max size
large 1500px
medium 480px
thumbnail 320px

Original files are always preserved in the upload/ directory.

๐Ÿ—„ Database

Required tables:

  • folders
  • files

These are included in the package.

โš™๏ธ Requirements

  • PHP 8.3+
  • QCubed-4
  • GD extension
  • WEBP support recommended

๐Ÿ“ Configuration

Verify directory paths in:

install/project/includes/configuration/active/2directories.cfg.php

Incorrect configuration will break uploads and file handling.

๐Ÿงช Usage

Navigation

  • Double-click โ†’ open folder
  • Single-click โ†’ select file or folder

Multi-selection

You can select multiple files in two ways:

  • Drag the mouse across rows (selection only)

  • OR use:

    • Cmd (Mac)
    • Ctrl (Windows)

Operations

After selecting files, use toolbar buttons:

  • Rename
  • Copy
  • Move
  • Delete
  • Download

๐Ÿ”’ File usage indicators

Color Meaning
๐ŸŸข Green Free file
๐Ÿ”ด Red Locked (in use by another service)
๐ŸŸก Yellow Reserved / activity locked

Controlled via activities_locked in the files table.

๐Ÿ”Œ Integrations

CKEditor

Allows:

  • inserting images
  • linking files

MediaFinder

Provides quick selection of files for content areas.

๐Ÿ“ฆ Upload system

Chunk upload (recommended)

  • Handles large files
  • Works better on slow connections
  • Uses .part* temporary files
  • Automatically merges chunks

Regular upload

  • Simpler fallback
  • Suitable for small files

๐Ÿง  Design philosophy

  • Centralize all files
  • Keep structure predictable
  • Separate original and generated data
  • Reflect real usage state in UI
  • Avoid hidden file duplication

๐Ÿ“‚ Examples

Located in examples:

  • dialoog.php
  • finder.php

Used mainly for popup integrations.

๐Ÿ–ผ Screenshots

FileManager

Image of kukrik

MediaFinder

Image of kukrik

CKEditor Integration

Image of kukrik

๐Ÿ“ฅ Installation

composer require twbs/bootstrap v3.3.7
composer require kukrik/qcubed-filemanager
composer require qcubed-4/plugin-bootstrap
composer require kukrik/bootstrap-filecontrol
composer require qcubed-4/plugin-ckeditor
composer require ckeditor/ckeditor

โš ๏ธ Notes

  • Built specifically for QCubed-4
  • Not framework-agnostic
  • upload/ is the source of truth
  • Temporary folders must remain clean

๐Ÿ’ฌ Feedback

Suggestions and improvements are welcome.