Skip to content

Latest commit

 

History

109 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DravenCMS File

File storage and administration for DravenCMS. The package combines salamek/nette-files with database-backed metadata, virtual structures, usage links, upload controls, selectors, and maintenance commands.

Features

  • Admin file manager with uploads, previews, metadata editing, and selection dialogs.
  • Content-addressed files stored below the public data directory.
  • Virtual directory structures and structure-file records.
  • Usage links that let other packages track whether a file is still needed.
  • Image/file rendering through Nette Files Latte integration.
  • Cleanup and storage-migration console commands.

Installation

composer require dravencms/file

The package loader publishes assets to %wwwDir%/assets/file and loads its configuration. By default, original data is stored under %wwwDir%/data, generated files under %wwwDir%/webtemp, and icons under %wwwDir%/assets/file/ico.

Apply the package's Doctrine schema and load its fixtures when the file-manager admin menu and ACL permissions are required. Ensure the web/PHP process can write to the data and webtemp directories.

Application Use

Inject FileRepository, StructureRepository, or StructureFileRepository when application code needs to create or query managed files. Prefer repository creation methods so hashes, metadata, and storage relationships remain consistent.

Other DravenCMS modules should associate files through StructureFileLink records. The isUsed and isAutoclean flags allow cleanup commands to distinguish retained files from disposable references.

Maintenance Commands

The package registers these commands:

file:orphaned:delete
file:unused:delete
file:unused-f:delete
file:extension:fix
file:segmented-storage:migrate

The delete and migration commands modify both database records and storage. Back up the database and data directory, inspect command help, and test against a non-production copy before running them in production.

Optional CMS Integration

Installing dravencms/structure allows file components to be exposed through the CMS integration layer.

License

This package is licensed under the LGPL-3.0-only license.

About

Draven CMS File module

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages