This commit is contained in:
Milos Stojanovic
2019-06-21 11:59:42 +02:00
parent a2633e1c9f
commit 18b92d7b76
12 changed files with 39 additions and 39 deletions

View File

@@ -54,16 +54,16 @@ You can also log in with john/john to see John's private files.
## Download precompiled build
- Latest: [v7.0.0-RC3](https://github.com/filegator/static/raw/master/builds/filegator_v7.0.0-RC3.zip)
- Unzip files and upload them to your PHP server
- Make sure you webserver can read and write to ```/storage``` and ```/private``` folders
- Set the website document root to ```/dist``` directory. This is also known as 'public' folder.
- Visit web page, if something goes wrong check ```/private/logs/app.log```
- Login with default credentials ```admin/admin123```
- Make sure you webserver can read and write to `/storage` and `/private` folders
- Set the website document root to `/dist` directory. This is also known as 'public' folder.
- Visit web page, if something goes wrong check `/private/logs/app.log`
- Login with default credentials `admin/admin123`
- Change default admin's password
## Project setup for development (Linux)
You must have ```git```, ```php```, ```npm```, and ```composer``` installed.
You must have `git`, `php`, `npm`, and `composer` installed.
```
git clone git@github.com:filegator/filegator.git
@@ -84,7 +84,7 @@ The following command will launch backend and frontend on ports 8081 and 8080:
```
npm run serve
```
Once everything is ready visit: ```http://localhost:8080```
Once everything is ready visit: `http://localhost:8080`
## Run tests & static analysis
@@ -97,7 +97,7 @@ vendor/bin/phpstan analyse ./backend
## Deployment
Set the website document root to ```/dist``` directory. This is also known as 'public' folder.
Set the website document root to `/dist` directory. This is also known as 'public' folder.
## Show your support

View File

@@ -34,14 +34,14 @@ Admin can enable Guest account which will allow everyone to interact with the re
If you forgot your admin password you can follow these steps to reset it:
- Backup your current users file ```/private/users.json``` to a safe place
- Copy blank template ```/private/users.json.blank``` over ```/private/users.json``` or simply refresh your browser
- Login as admin with default credentials ```admin/admin123```
- Put your original users file back to ```/private/users.json``` replacing the template
- Backup your current users file `private/users.json` to a safe place
- Copy blank template `private/users.json.blank` over `private/users.json` or simply refresh your browser
- Login as admin with default credentials `admin/admin123`
- Put your original users file back to `private/users.json` replacing the template
- Since you are now logged in as admin, simply go to users page and change your password
- Log out and try to login with the new password
Note: If you're using database Auth adapter then simply run this query to set default password back to ```admin123```:
Note: If you're using database Auth adapter then simply run this query to set default password back to `admin123`
```

View File

@@ -20,7 +20,7 @@ Default handler accepts only file name parameter. This file should be writable b
## Configuring Auth service to use database
You can use mysql database to store your users.
First, create a table ```users``` with this sql query:
First, create a table `users` with this sql query:
```
CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
@@ -43,7 +43,7 @@ VALUES
('admin', 'Admin', 'admin', 'read|write|upload|download|batchdownload|zip', '/', '$2y$10$Nu35w4pteLfc7BDCIkDPkecjw8wsH8Y2GMfIewUbXLT7zzW6WOxwq');
```
At the end, open ```configuration.php``` and update AuthInterface handler to reflect your database settings:
At the end, open `configuration.php` and update AuthInterface handler to reflect your database settings:
```
'Filegator\Services\Auth\AuthInterface' => [

View File

@@ -1,15 +1,15 @@
---
currentMenu: basic
currentMenu: auth
---
## Basic
All services are set with reasonable defaults. For regular users there is no need to change anything. The script should work out of the box.
You can edit ```/configuration.php``` file to change the basic things like logo image, title, language and upload restrictions.
You can edit `configuration.php` file to change the basic things like logo image, title, language and upload restrictions.
Note: if you've made a mistake in configuration file (forgot to close a quote?) the script will fail to load or throw an error. Please use provided default ```configuration_sample.php``` to put everything back to normal.
Note: if you've made a mistake in configuration file (forgot to close a quote?) the script will fail to load or throw an error. Please use provided default `configuration_sample.php` to put everything back to normal.
```
'frontend_config' => [
@@ -37,7 +37,7 @@ You can add additional html to the head and body like this:
```
## Frontend tweaks
To change default color scheme and other options, edit ```/frontend/App.vue```. When you're done, recompile with ```npm run build```.
To change default color scheme and other options, edit `frontend/App.vue` When you're done, recompile with `npm run build`
```
// Primary color

View File

@@ -6,7 +6,7 @@ currentMenu: logging
Logging is provided trough the powerful [Monolog](https://github.com/Seldaek/monolog) library. Please check their docs for more info.
Default handler will use simple ```/private/logs/app.log``` file to store application logs and errors.
Default handler will use simple `private/logs/app.log` file to store application logs and errors.
```
'Filegator\Services\Logger\LoggerInterface' => [

View File

@@ -6,17 +6,17 @@ currentMenu: router
Router service is using well-known [FastRoute](https://github.com/nikic/FastRoute) library. There is no need to change this service unless you're extending the script.
The router uses unique query parameter ```?r=``` to pass the route info. Because of this feature, this (single-page) application does not require rewrite rules, .htaccess or similar tweaks.
The router uses unique query parameter `?r=` to pass the route info. Because of this feature, this (single-page) application does not require rewrite rules, .htaccess or similar tweaks.
Example routes:
- ```http://example.com/?r=/some/route&param1=val1&param2=val2```
- ```http://example.com/?r=/user/{user_id}&param1=val1```
- `http://example.com/?r=/some/route&param1=val1&param2=val2`
- `http://example.com/?r=/user/{user_id}&param1=val1`
## Routes file
Routes file is located here ```/backend/Controllers/routes.php```. Each route in the routes array looks like this:
Routes file is located here `backend/Controllers/routes.php` Each route in the routes array looks like this:
```

View File

@@ -24,4 +24,4 @@ Simple security service is included in the script by default. This service provi
],
```
If you set ```ip_whitelist``` then only users coming from listed IP addresses will be able to use the script.
If you set `ip_whitelist` then only users coming from listed IP addresses will be able to use the script.

View File

@@ -6,7 +6,7 @@ currentMenu: sessions
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.
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' => [
@@ -24,7 +24,7 @@ Default session handler will user PHP's built in file storage. You can also spec
```
## Configuring Session service to use database
First, create a table ```sessions``` with this sql:
First, create a table `sessions` with this sql:
```
CREATE TABLE `sessions` (
`sess_id` varbinary(128) NOT NULL,
@@ -35,7 +35,7 @@ CREATE TABLE `sessions` (
) CHARSET=utf8 COLLATE=utf8_bin;
```
Then, open ```configuration.php``` and update Session handler to:
Then, open `configuration.php` and update Session handler to:
```
'Filegator\Services\Session\SessionStorageInterface' => [
@@ -58,7 +58,7 @@ Don't forget to enter correct database details.
## Tweaking session options
The underying [session component](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php) accepts array of options.
For example you can pass ```cookie_lifetime``` parameter to extend default session lifetime:
For example you can pass `cookie_lifetime` parameter to extend default session lifetime:
```
'Filegator\Services\Session\SessionStorageInterface' => [
'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',

View File

@@ -10,7 +10,7 @@ You can use local filesystem (default), FTP, S3, Dropbox and many others.
Please check the Flysystem [docs](https://github.com/thephpleague/flysystem) for the exact setup required for each adapter.
## Default Local Disk Adapter
With default adapter you just need to configure where your ```repository``` folder is. This folder will serve as a root for everything else.
With default adapter you just need to configure where your `repository` folder is. This folder will serve as a root for everything else.
```
'Filegator\Services\Storage\Filesystem' => [
@@ -52,7 +52,7 @@ See official [documentation](https://flysystem.thephpleague.com/docs/adapter/ftp
```
## SFTP Adapter
You must require additional library ```composer require league/flysystem-sftp```.
You must require additional library `composer require league/flysystem-sftp`
See official [documentation](https://flysystem.thephpleague.com/docs/adapter/sftp/).
@@ -76,7 +76,7 @@ See official [documentation](https://flysystem.thephpleague.com/docs/adapter/sft
```
## Dropbox Adapter
You must require additional library ```composer require spatie/flysystem-dropbox```.
You must require additional library `composer require spatie/flysystem-dropbox`
See official [documentation](https://flysystem.thephpleague.com/docs/adapter/dropbox/)

View File

@@ -4,7 +4,7 @@ currentMenu: development
## Project setup for development (Linux)
You must have ```git```, ```php```, ```npm```, and ```composer``` installed.
You must have `git`, `php`, `npm`, and `composer` installed.
```
git clone git@github.com:filegator/filegator.git
@@ -24,7 +24,7 @@ The following command will launch backend and frontend on ports 8081 and 8080:
```
npm run serve
```
Once everything is ready visit: ```http://localhost:8080```
Once everything is ready visit: `http://localhost:8080`
## Run tests & static analysis
@@ -35,5 +35,5 @@ vendor/bin/phpstan analyse ./backend
## Deployment
Set the website document root to ```/dist``` directory. This is also known as 'public' folder.
Set the website document root to `/dist` directory. This is also known as 'public' folder.

View File

@@ -9,10 +9,10 @@ currentMenu: install
## Download precompiled build
- Latest: [v7.0.0-RC3](https://github.com/filegator/static/raw/master/builds/filegator_v7.0.0-RC3.zip)
- Unzip files and upload them to your PHP server
- Make sure you webserver can read and write to ```/storage``` and ```/private``` folders
- Set the website document root to ```/dist``` directory. This is also known as 'public' folder.
- Visit web page, if something goes wrong check ```/private/logs/app.log```
- Login with default credentials ```admin/admin123```
- Make sure you webserver can read and write to `/storage` and `/private` folders
- Set the website document root to `/dist` directory. This is also known as 'public' folder.
- Visit web page, if something goes wrong check `/private/logs/app.log`
- Login with default credentials `admin/admin123`
- Change default admin's password
## Upgrade

View File

@@ -4,7 +4,7 @@ currentMenu: default
## Translations
Default language file is located under ```/frontend/translations/english.js```. You can add more languages in the same folder and adjust ```language``` variable in your ```configuration.php``` file to use it.
Default language file is located under `frontend/translations/english.js` You can add more languages in the same folder and adjust `language` variable in your `configuration.php` file to use it.
You should only translate value on the right, for example: