mirror of
https://github.com/filegator/filegator.git
synced 2025-10-23 14:56:25 +02:00
246 lines
11 KiB
HTML
246 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<title>FileGator</title>
|
|
|
|
<link rel="stylesheet" href="https://docs.filegator.io/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="https://docs.filegator.io/css/font-awesome.min.css">
|
|
<link rel="stylesheet" href="https://docs.filegator.io/css/highlight.dark.css">
|
|
<link rel="stylesheet" href="https://docs.filegator.io/css/main.css">
|
|
</head>
|
|
<body>
|
|
|
|
<header class="navbar navbar-default navbar-fixed-top">
|
|
|
|
<a class="navbar-brand" href="https://docs.filegator.io/">
|
|
FileGator
|
|
<small class="hidden-xs hidden-sm">
|
|
Documentation
|
|
</small>
|
|
</a>
|
|
|
|
<a href="https://github.com/filegator/filegator">
|
|
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
|
|
</a>
|
|
|
|
</header>
|
|
|
|
<main class="container-fluid">
|
|
<div class="row">
|
|
|
|
|
|
<nav id="sidebar" class="col-sm-3 col-lg-2" role="navigation">
|
|
|
|
<ul class="nav nav-pills nav-stacked">
|
|
<li class="">
|
|
<a href="https://docs.filegator.io/index.html">
|
|
What is FileGator
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a href="https://docs.filegator.io/install.html">
|
|
Installation
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a href="https://docs.filegator.io/configuration.html">
|
|
Configuration
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a href="demo.html">
|
|
Demo
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a href="license.html">
|
|
License
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
|
|
<section id="content" class="col-sm-offset-3 col-lg-offset-2 col-sm-9 col-lg-10">
|
|
<h3 id="configuration-options">Configuration options:</h3>
|
|
<pre><code> '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',
|
|
],
|
|
],
|
|
],</code></pre>
|
|
</section>
|
|
|
|
</div>
|
|
</main>
|
|
|
|
<footer>
|
|
<div class="container-fluid">
|
|
<p class="text-muted">
|
|
website generated with <a href="http://couscous.io" title="Markdown website generator">Couscous</a>
|
|
</p>
|
|
</div>
|
|
</footer>
|
|
|
|
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
|
|
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
|
|
<script src="//yastatic.net/highlightjs/8.2/highlight.min.js"></script>
|
|
|
|
<script>
|
|
$(function() {
|
|
$("section>h1").wrap('<div class="page-header" />');
|
|
// Syntax highlighting
|
|
hljs.initHighlightingOnLoad();
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|