47 lines
940 B
Markdown
47 lines
940 B
Markdown
# cabinet
|
|
|
|
Store your files and links in your cabinet.
|
|
|
|
Inspired by [chanbakjsd/filehost](https://github.com/chanbakjsd/filehost).
|
|
|
|
## How to upload files?
|
|
|
|
HTTP POST files:
|
|
|
|
```shell
|
|
curl -F'file=@yourfile.png' https://example.com/f
|
|
```
|
|
|
|
If the instance is token protected:
|
|
|
|
```shell
|
|
curl -F'file=@yourfile.png' -F'token=yourtoken' https://example.com/f
|
|
```
|
|
|
|
You can access uploaded files at the returned URL.
|
|
|
|
## How to shorten URLs?
|
|
|
|
HTTP POST your URL:
|
|
|
|
```shell
|
|
curl -d'url=https://example.com' https://example.com/r
|
|
```
|
|
|
|
If the instance is token protected:
|
|
|
|
```shell
|
|
curl -d'url=https://example.com' -d'token=yourtoken' https://example.com/r
|
|
```
|
|
|
|
You can access redirects at the returned URL.
|
|
|
|
## How long are files and shortened URLs kept?
|
|
|
|
Until the configured limit of the server is reached! Older and larger files get killed when that's reached.
|
|
|
|
URLs are treated as files with the URL as its content.
|
|
|
|
## License
|
|
|
|
[MIT](LICENSE) |