Visuly uses a JSON file to be configured. The JSON has to be stored in
./files/config.json # Config template: ./files/config_template.json
In this file will be the steps to configure the System.
1. Database
This section is referring to the database section of the config file.
Visuly uses a mysql database for its backend. The database can be easily configured in configfile.
| field | description |
|---|---|
host |
The host (IP or Hostname) for the database |
database |
the name of the database that Visuly should use |
username |
the username for the database |
password |
the password for the database |
2. Token
Visuly uses a token to store the login in the browser, and there are a couple of configurable options here too.
2.1. name
The name of the cookie for storing the token in the browser
supported values:
-
a - z
-
A - Z
-
0 - 9
2.2. salt
The salt used in the hashing of the token.
This can be empty, but that would be a security risk
2.3. length
default value: 30
The character length of the token
supported values:
-
numeric values
2.4. lifespan
default value: 24 (2 years)
The duration in months the token will be valid
supported values:
-
numeric values
3. Post
3.1. defaultDir
default value: "/files/img/post"
The default directory for storing the image
the path has to beginn with a "/"!
3.2. imgType
default value: "jpg"
The type of the image the programm should store
supported values:
-
jpg
-
png
-
gif
3.3. nameLength:
default value: 60
The length of the postId. This should not exceed the length configured in the database.
supported values:
-
0 - 60
3.4. maxSize:
default value: 10.000.000
The maximum Size supported for uploaded Images
supported values:
-
1 - *
3.5. imgHeight
default value: 1080
The height (in pixel) of the Image the stored (and compressed) image should be stored.
supported values:
-
0 - 10.000
3.6. imgQuality
default value: 80
The compression Quality
supported values:
-
-1 (this will default to 75)
-
0 - 100
0 being the worst quality 100 being the best
4. User
4.1. maxImgSize
default value: 10000000
The maximum image size that the user is allowed to upload for a user image in Bytes.
supported values:
-
0 - *
4.2. imgHeight
default value: 256
The height of the image for the user after upload. The image will be stored in this height.
Since the Image is square, the width of the image will be the same.
supported values:
-
1 - *
4.3. imgQuality
default value: 80
The image quality for the user. This is the compression rate that the project will use.
-
supported values:
-
-1 (this will default to 75)
-
0 - 100
4.4. imageFolder
default value: "/files/img/users"
This is the directory (absolute from the root of the webserver) where userimage will be stored.
4.5. imgNameLength
default value: 20
This is the default length of the name for the userimage. The name will be randomly generated, and this will be the total length of this randomly generated String.
The database value must support the length of this value!
supported values:
-
1 - *
4.6. imgType
default value: "jpg"
This is the image compression algorithm used in the upload.
supported values:
-
jpg
-
png
-
gif
4.7. defaultPermission
default value: "2"
This is the default permission for the user. This is the permission level, that a normal user has. This is the primary key on the permission table in the database
supported values:
-
1 - *
4.8. adminPermission
default value: "1"
This is the admin permission for the user. THis is the permission level that admins have. This is the primar key on the permission table in the database.
supported values:
-
1 - *
4.9. defaultImage
default value: user.png
The default image used for a new user, when there is no profile picture in use
supported values:
-
*
5. Other
5.1. userImageFolder
| Deprecated |
default value: "/files/img/users"
the default directory for the profile pictures for users.
The path has to beginn with a "/"!
5.2. userDefaultImage
default value: user.png
| Deprecated |
The default image for new users.
This image has to be in the userImageFolder.
5.3. userDefaultPermission
default value: 2
| Deprecated |
The default permission for all users.
this is the Primary key of the permission table.
supported values:
-
1 - *
5.4. passwordSalt
The salt that the password uses.
| leaving this empty is a great security risk! |
5.5. respLength
default value: 50
The length of the API responses
For example:
If you request the newest post, the amount of posts will be limited by respLength. (if there are enough posts)