You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin includes a file uploading server that will store any user uploaded files on the
server and then offer them as file downloads with a unique URL. The option to delete files
after a set time period discourages users from using the server as a permanent file store.
Adjust BasePath and CorsOrigins as needed in fileuploader.config.toml.
Create a symlink to plugin-fileuploader/webircgateway-plugin/fileuploader-server.go in webircgateway/plugins/fileuploader/plugin.go.
Run make in the webircgateway/ folder to build the plugin.
Start the webircgateway.
Building the Kiwi IRC plugin
The kiwi plugin is the javascript file that you link to in your kiwiirc configuration. It is the front end that provides the upload UI.
$ yarn start will start a webpack development server that hot-reloads the plugin as you develop it. Use the URL https://localhost:9000/main.js as the plugin URL in your kiwiirc configuration.
$ yarn build will build the final plugin that you can use in production. It will be built into dist/main.js.
Loading the plugin into kiwiirc
Add the plugin javascript file to your kiwiirc config.json and configure the settings:
{
"plugins": [
{
"name": "fileuploader",
"url": "https://localhost:9000/plugin-fileuploader.js"
}
],
"fileuploader": {
"server": "https://localhost:8088/files",
"maxFileSize": 10485760,
"note": "Add an optional note to the upload dialog"
}
}
If you're running the fileuploader server as a webircgateway plugin, use the webircgateway hostname, e.g.
"server": "https://ws.irc.example.com/files",
Database configuration
File uploads are logged into a database. Currently the supported databases are sqlite3 and mysql.
Database.Type can either be sqlite3 or mysql. The default is sqlite3.