From 41eff6a36a55b433e92e5369b8cf23ab35eb8d06 Mon Sep 17 00:00:00 2001 From: Milos Stojanovic Date: Tue, 18 Jun 2019 11:44:29 +0200 Subject: [PATCH] Website generation with Couscous --- configuration.html | 245 +++++++++++++++++++++++++++++++++++++++++++++ demo.html | 99 ++++++++++++++++++ index.html | 76 ++++++++++++-- install.html | 110 ++++++++++++++++++++ license.html | 111 ++++++++++++++++++++ 5 files changed, 630 insertions(+), 11 deletions(-) create mode 100644 configuration.html create mode 100644 demo.html create mode 100644 install.html create mode 100644 license.html diff --git a/configuration.html b/configuration.html new file mode 100644 index 0000000..d624d38 --- /dev/null +++ b/configuration.html @@ -0,0 +1,245 @@ + + + + + + + FileGator + + + + + + + + + + +
+
+ + + + + +
+

Configuration options:

+
    'public_path' => APP_PUBLIC_PATH,
+    'public_dir' => APP_PUBLIC_DIR,
+
+    'frontend_config' => [
+        'app_name' => 'FileGator',
+        'app_version' => APP_VERSION,
+        'language' => 'english',
+        'logo' => 'https://raw.githubusercontent.com/filegator/filegator/master/dist/img/logo.png',
+        'upload_max_size' => 100 * 1024 * 1024, // 100MB
+        'upload_chunk_size' => 1 * 1024 * 1024, // 1MB
+        'upload_simultaneous' => 3,
+        'default_archive_name' => 'archive.zip',
+    ],
+
+    'services' => [
+        'Filegator\Services\Logger\LoggerInterface' => [
+            'handler' => '\Filegator\Services\Logger\Adapters\MonoLogger',
+            'config' => [
+                'monolog_handlers' => [
+                    function () {
+                        return new \Monolog\Handler\StreamHandler(
+                            __DIR__.'/private/logs/app.log',
+                            \Monolog\Logger::DEBUG
+                        );
+                    },
+                ],
+            ],
+        ],
+        'Filegator\Services\Session\SessionStorageInterface' => [
+            'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',
+            'config' => [
+                'session_handler' => 'filesession',
+                'available' => [
+                    'filesession' => function () {
+                        $save_path = null; // use default system path
+                        //$save_path = __DIR__.'/private/sessions';
+                        $handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler($save_path);
+
+                        return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
+                    },
+                    'database' => function () {
+                        $handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler(
+                            'mysql://root:password@localhost:3360/filegator'
+                        );
+
+                        return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
+                    },
+                ],
+            ],
+        ],
+        'Filegator\Services\Cors\Cors' => [
+            'handler' => '\Filegator\Services\Cors\Cors',
+            'config' => [
+                'enabled' => APP_ENV == 'production' ? false : true,
+            ],
+        ],
+        'Filegator\Services\Tmpfs\TmpfsInterface' => [
+            'handler' => '\Filegator\Services\Tmpfs\Adapters\Tmpfs',
+            'config' => [
+                'path' => __DIR__.'/private/tmp/',
+                'gc_probability_perc' => 10,
+                'gc_older_than' => 60 * 60 * 24 * 2, // 2 days
+            ],
+        ],
+        'Filegator\Services\Security\Security' => [
+            'handler' => '\Filegator\Services\Security\Security',
+            'config' => [
+                'csrf_protection' => true,
+                'ip_whitelist' => [],
+                'ip_blacklist' => [],
+            ],
+        ],
+        'Filegator\Services\View\ViewInterface' => [
+            'handler' => '\Filegator\Services\View\Adapters\Vuejs',
+            'config' => [
+                'add_to_head' => '',
+                'add_to_body' => '',
+            ],
+        ],
+        'Filegator\Services\Storage\Filesystem' => [
+            'handler' => '\Filegator\Services\Storage\Filesystem',
+            'config' => [
+                'separator' => '/',
+                'config' => [],
+                'filesystem_adapter' => 'localfilesystem',
+                'adapters' => [
+                    'localfilesystem' => function () {
+                        return new \League\Flysystem\Adapter\Local(
+                            __DIR__.'/repository'
+                        );
+                    },
+                    'ftp' => function () {
+                        // see: https://flysystem.thephpleague.com/docs/adapter/ftp/
+                        return new \League\Flysystem\Adapter\Ftp([
+                            'host' => 'example.com',
+                            'username' => 'demo',
+                            'password' => 'password',
+                            'port' => 21,
+                            'timeout' => 10,
+                        ]);
+                    },
+                    'sftp' => function () {
+                        // composer require league/flysystem-sftp
+                        // see: https://flysystem.thephpleague.com/docs/adapter/sftp/
+                        return new \League\Flysystem\Sftp\SftpAdapter([
+                            'host' => 'example.com',
+                            'port' => 22,
+                            'username' => 'demo',
+                            'password' => 'password',
+                            'timeout' => 10,
+                        ]);
+                    },
+                    'dropbox' => function () {
+                        // composer require spatie/flysystem-dropbox
+                        // see: https://flysystem.thephpleague.com/docs/adapter/dropbox/
+                        $authorizationToken = '1234';
+                        $client = new \Spatie\Dropbox\Client($authorizationToken);
+
+                        return new \Spatie\FlysystemDropbox\DropboxAdapter($client);
+                    },
+                ],
+            ],
+        ],
+        'Filegator\Services\Archiver\ArchiverInterface' => [
+            'handler' => '\Filegator\Services\Archiver\Adapters\ZipArchiver',
+            'config' => [],
+        ],
+        'Filegator\Services\Auth\AuthInterface' => [
+            'handler' => '\Filegator\Services\Auth\Adapters\JsonFile',
+            'config' => [
+                'file' => __DIR__.'/private/users.json',
+            ],
+            //'handler' => '\Filegator\Services\Auth\Adapters\Database',
+            //'config' => [
+            //    'driver' => 'mysqli',
+            //    'host' => 'localhost',
+            //    'username' => 'root',
+            //    'password' => 'password',
+            //    'database' => 'filegator',
+            //],
+        ],
+        'Filegator\Services\Router\Router' => [
+            'handler' => '\Filegator\Services\Router\Router',
+            'config' => [
+                'query_param' => 'r',
+                'routes_file' => __DIR__.'/backend/Controllers/routes.php',
+            ],
+        ],
+    ],
+
+ +
+
+ + + + + + + + + + + diff --git a/demo.html b/demo.html new file mode 100644 index 0000000..17ff1c6 --- /dev/null +++ b/demo.html @@ -0,0 +1,99 @@ + + + + + + + FileGator + + + + + + + + + + +
+
+ + + + + +
+

Demo

+

https://demo.filegator.io

+

This is read-only demo with guest account enabled. +You can also log in with john/john to see John's private files.

+
+ +
+
+ + + + + + + + + + + diff --git a/index.html b/index.html index b030294..59b19c8 100644 --- a/index.html +++ b/index.html @@ -4,40 +4,94 @@ - + FileGator - - - - + + + + -
+
-
+ + + +

FileGator

+

FileGator is PHP script for managing online files and folders.

+

You can manage files inside your local repository folder (on your server's hard drive) or connect to other storage adaptes (see below).

+

FileGator has multi-user support so you can have admins and other users managing files with different access permissions, roles and home folders.

+

All basic file operations are supported: copy, move, rename, create, delete, zip, unzip, download, upload.

+

If allowed, users can download multiple files or folders at once.

+

File upload supports drag&drop, progress bar, pause and resume. Upload is chunked so you should be able to upload large files regardless of your server configuration.

+

Features & Goals

+
    +
  • Multiple storage adapters (Local, FTP, S3, Dropbox and many others via Flysystem)
  • +
  • Multiple auth adapters with roles and permissions (Store users in json file or database)
  • +
  • Multiple session adapters (Native File, Pdo, MongoDB, Memcached and others via Symfony)
  • +
  • Single page front-end (built with Vuejs, Bulma and Buefy)
  • +
  • Chunked uploads (built with Resumable.js)
  • +
  • Zip and bulk download support
  • +
  • Highly extensible, decoupled and tested code
  • +
  • No database required
  • +
  • Framework free
  • +