CodeIgniter Forums
Files management module - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Addins (https://forum.codeigniter.com/forumdisplay.php?fid=34)
+--- Thread: Files management module (/showthread.php?tid=77817)

Pages: 1 2


Files management module - MGatner - 10-21-2020

Hi all! I thought I posted about this one when I released the initial version, but I can't find the thread so maybe I forgot to? Either way, if you've never heard of Tatter\Files then you're in luck: it's better than ever!

Tatter\Files: File Uploads and Management
https://github.com/tattersoftware/codeigniter4-files

"Files" is a self-contained file management suite, with its own routes, model, controller, and view. Install via Composer, update your database, and voila! instant file management.
But it's better! The whole thing is modular and very configurable/extendable. Don't want just anyone to upload? No problem, adjust permissions for every CRUD action and route. Want to embed files in en existing page? No problem, requests respond to AJAX or you may load the view directly. See the README for all the things you could possibly configure.

A significant motivating factor for this version was to take advantage of the underlying packages and their powerful improvements: Tatter\Handlers, Tatter\Exports, and Tatter\Thumbnails. All these modules have been refactored to eliminate extra steps (like unnecessary migrations), apply full static analysis and unit tests, and fix a slew of bugs.

"Files" is better than ever, but there are bound to be bugs and missing features. I welcome your feedback here, or on the GitHub repo.

Quick Start:

1. Install with Composer: > composer require tatter/files
2. Migrate the database: > php spark migrate -all
3. Seed the database: > php spark db:seed "Tatter\Files\Database\Seeds\FileSeeder"
4. Start managing files: https://example.com/files

By default Files configures the "/files/" route and is set up in a loose dropbox mode where anyone can upload files and view existing versions. Permissions can be applied directly to the model with a simple chmod-style "mode" (e.g. 755), via controller filters, or with a whole authentication suite (like Myth:Auth).
The MVC portion of the module uses its Config file to adjust behavior, which you can copy into App and change as needed. Controllers/Files.php contains a number of helper methods that make it easy to extend, so your own "app/Controllers/Widgets.php" can extend "Tatter\Files\Controllers\Files" to make easy lists of widget files.

Some screenshots.

[Image: 96811765-ff82c500-13e9-11eb-9f1d-c9461ef1a438.png]

[Image: 96811782-00b3f200-13ea-11eb-9f39-df56362e1d2b.png]

[Image: 96811800-01e51f00-13ea-11eb-8a2d-f06ae5dff469.png]


RE: Files management module - {e}aksquad - 10-22-2020

@MGatner - Wow - you did a fantastic job with this! I love how CI4 was totally revamped and is making a comeback... especially with you, Lonnie, and a few others showing what really can be done with the new system.


RE: Files management module - denis303 - 10-22-2020

Thanks for sharing!


RE: Files management module - MGatner - 10-22-2020

Thanks friends!


RE: Files management module - nc03061981 - 10-24-2020

Thanks @MGatner for useful Module


RE: Files management module - opassley - 11-23-2020

Hey all.
I am more a web designer than a developer using shared hosting. How can I install this module and others without using Composer?


RE: Files management module - MGatner - 11-25-2020

I have instructions in the README file. Basically you will download the repo and move the “src/“ folder into your project (a lot of people use ThirdParty). Then in app/Config/Autoload.php you will add a namespace reference to the folder. You will need to repeat this with all the module dependencies as well, which should quickly help you appreciate Composer. Smile
If the issue is actually running code on the server you could use Composer locally to install all dependencies, then zip up the entire project (including vendor) and deploy that to your server.


RE: Files management module - Nacho - 12-18-2020

Hi everyone,

@MGatner Thanks for sharing this great module!
I've been trying to get it working in my installation to no avail. I followed given instructions with composer:

1. Install with Composer: > composer require tatter/files
2. Migrate the database: > php spark migrate -all
3. Seed the database: > php spark dbConfusedeed "Tatter\Files\Database\Seeds\FileSeeder"
4. Start managing files: https://example.com/files


Everything seems to be fine up to step number 3 (directories and files installed, db tables in place), but when I go to localhost:8080/files, I get the exception:
Missing dependency: authentication function user_id()
VENDORPATH/tatter/files/src/Controllers/Files.php at line 78

What am I missing? Any help would be appreciated.


RE: Files management module - luispastendev - 12-21-2020

thanks for sharing MGatner I'll check it out Smile


RE: Files management module - MGatner - 12-23-2020

@Nacho you need to have an authentication system in order for Files to manage authorization. `user_id()` is the framework’s recommendation for authentication libraries to provide a common interface for identifying a user.
I will plan to add a note about this into the docs.