2021-01-12 03:24:47 +00:00
|
|
|
**12.01.2021: Fling has moved to the attic**
|
|
|
|
|
|
|
|
Fling was a good learning experiment for a non-trivial React app with a REST
|
|
|
|
backend. However, it never really got any traction and I'm not using it anymore.
|
|
|
|
Other projects are more important to me and maintaining Fling does not make any
|
|
|
|
sense. As of now docker containers are deleted and the artifacts are not
|
|
|
|
distributed anymore. You are free to fork and build your own version but no more
|
|
|
|
work will be done in this repository.
|
|
|
|
|
|
|
|
Alternatives:
|
|
|
|
- If you are looking for mature self-hosted file sharing solution,
|
|
|
|
[ownCloud](https://owncloud.com/) is in many ways similar to Fling and then
|
|
|
|
some.
|
|
|
|
- If you want an even simpler solution for sharing files over http,
|
|
|
|
[dirl](https://github.com/arminfriedl/dirl) might meet your needs.
|
2020-07-27 18:41:26 +00:00
|
|
|
|
|
|
|
# Fling
|
|
|
|
Fling is a self-hosted file share. It is simple like USB without missing out on
|
2020-07-29 16:18:15 +00:00
|
|
|
the good parts of a web app:
|
|
|
|
- Just drop files on a Fling and share the URL
|
|
|
|
- Choose your own name for your share-URL
|
2020-07-27 18:41:26 +00:00
|
|
|
- Share a direct download link
|
2020-07-29 16:18:15 +00:00
|
|
|
- Let others upload files
|
2020-07-27 18:41:26 +00:00
|
|
|
- Protect your fling by a password - no registration required
|
2020-07-29 16:18:15 +00:00
|
|
|
- Let a fling expire after a date or a number of clicks
|
2020-07-27 18:41:26 +00:00
|
|
|
|
2020-07-29 16:18:15 +00:00
|
|
|
# API
|
|
|
|
Fling is distributed as both, a backend service and a web interface. You can use
|
|
|
|
the backend on its own with any [HTTP client](examples).
|
2020-07-27 18:41:26 +00:00
|
|
|
|
2020-07-29 16:18:15 +00:00
|
|
|
Per default Fling publishes a Swagger UI page and an OpenAPI spec. You can find
|
|
|
|
them here:
|
2020-07-27 18:41:26 +00:00
|
|
|
|
2020-07-29 16:18:15 +00:00
|
|
|
``` http
|
|
|
|
http://<host>:<port>/swagger-ui.html
|
|
|
|
http://<host>:<port>/v3/api-docs
|
|
|
|
```
|
|
|
|
|
|
|
|
If starting the fling container locally, the default `<host>:<port>` is
|
|
|
|
http://localhost:3000. You can also find a recent version of it via
|
|
|
|
https://fling.friedl.net/swagger-ui.html and
|
|
|
|
https://fling.friedl.net/v3/api-docs.
|
2020-07-27 18:41:26 +00:00
|
|
|
|
2020-07-29 16:18:15 +00:00
|
|
|
# Starting Fling from Docker
|
2021-01-12 03:24:47 +00:00
|
|
|
A Fling container is provided at https://hub.docker.com/repository/docker/arminfriedl/fling.
|
2020-07-27 18:41:26 +00:00
|
|
|
|
2021-01-12 03:24:47 +00:00
|
|
|
1. Run `docker run --rm -p3000:3000 arminfriedl/fling`
|
2020-07-29 16:18:15 +00:00
|
|
|
2. Go to the default http://localhost:3000
|
|
|
|
3. Log in with `adminName:adminPassword`.
|
2020-07-27 18:41:26 +00:00
|
|
|
|
|
|
|
## Configuring Fling
|
|
|
|
The Fling container can be configured by environment variables.
|
|
|
|
|
2020-07-29 16:18:15 +00:00
|
|
|
The web interface configuration ([config.js](web/fling/public/config.js)/[config.js.template](container/var/www/fling/config.js.template)) will be
|
|
|
|
filled by `envsubst` when the container starts up.
|
2020-07-27 18:41:26 +00:00
|
|
|
``` sh
|
|
|
|
# The base URL of the Fling API service
|
|
|
|
FLING_API_BASE=http://localhost:3000
|
2020-07-29 16:18:15 +00:00
|
|
|
# Log level of the application
|
2020-07-27 18:41:26 +00:00
|
|
|
FLING_LOG_LEVEL=warn
|
2020-07-29 16:18:15 +00:00
|
|
|
# Max. upload size in bytes. Checked on client side.
|
2020-07-27 18:41:26 +00:00
|
|
|
FLING_FILESIZE=209715200
|
|
|
|
```
|
|
|
|
|
2020-07-29 16:18:15 +00:00
|
|
|
The Fling service configuration is a standard spring configuration. It can be
|
|
|
|
set by environement variables or any other [configuration externalization supported by spring boot]
|
|
|
|
(https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config)).
|
|
|
|
Refer to the [application-prod.yml](service/fling/src/main/resources/application-prod.yml) for configuration options.
|