Welcome Guest, Not a member yet? Register   Sign In
Files management module
#1

(This post was last modified: 10-21-2020, 07:15 PM by MGatner.)

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]
Reply
#2

@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.
Reply
#3

Thanks for sharing!
Reply
#4

Thanks friends!
Reply
#5

Thanks @MGatner for useful Module

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply
#6

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?
Reply
#7

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.
Reply
#8

(This post was last modified: 12-19-2020, 05:09 PM by Nacho.)

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.
Reply
#9

thanks for sharing MGatner I'll check it out Smile
Reply
#10

@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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB