This commit is contained in:
Milos Stojanovic
2019-06-19 14:30:54 +02:00
parent b3400d7577
commit dc73a18bbc
8 changed files with 166 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ Default handler accepts only file name parameter. This file should be writable b
```
## Configuring Auth service to use database
You can also use mysql database to store your users.
You can use mysql database to store your users.
First, create a table ```users``` with this sql query:
```

View File

@@ -5,6 +5,19 @@ You can edit ```configuration.php``` to change the basic things like logo image,
NOTE: if you've made a mistake in configuration file, forgot to close a quote, the script will throw an error. Please use provided default ```configuration_sample.php``` to verify this.
```
'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',
],
```
## Additional HTML
You can add additional html to the head and body like this:
```

View File

@@ -1,5 +1,4 @@
## Configuring Security
## Configuring Security service
Simple security service is included in the script by default. This service provides:

View File

@@ -1,4 +1,24 @@
## Default Session handler
Session handling is provided through the Symfony's [HttpFoundation](https://symfony.com/doc/current/components/http_foundation.html) component. Please check their docs for more info.
Default session handler will user PHP's built in file storage. You can also specify your own ```$save_path``` to store session files.
```
'Filegator\Services\Session\SessionStorageInterface' => [
'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',
'config' => [
'handler' => 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);
},
],
],
```
## Configuring Session service to use database
First, create a table ```sessions``` with this sql: