Skip to content

Commit 50209d4

Browse files
Update README.md
1 parent 1a257d3 commit 50209d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A tiny, self-hosted upload target for ShareX and similar clients. Runs on Node.j
1111

1212
## Quickstart
1313

14-
### Docker is the recommended way to run ShareX-Server! (see [Docker Hub](https://hub.docker.com/r/alexthemaster/sharex-server)).
14+
### 🐳 Docker is the recommended way to run Sh ShareX-Server! See [Docker Hub](https://hub.docker.com/r/alexthemaster/sharex-server) for setup instructions.
1515

1616
#### Manually in your Node app:
1717

@@ -21,7 +21,7 @@ A tiny, self-hosted upload target for ShareX and similar clients. Runs on Node.j
2121
new ShareXServer({ password: "s3cret", port: 8080, savePath: "./uploads" });
2222
```
2323

24-
## Options
24+
#### Options
2525

2626
All options accepted by the `ShareXServer` constructor:
2727

@@ -35,7 +35,7 @@ All options accepted by the `ShareXServer` constructor:
3535
- `debug` (boolean, default `false`) - Enable verbose debug logging to the console.
3636
- `forceHttps` (boolean, default `false`) - Force HTTPS for return URL (useful when running behind reverse proxy)
3737

38-
Usage notes:
38+
## Usage notes:
3939

4040
- The server saves uploaded files directly under `savePath` and will serve any file in that directory - do not point `savePath` at directories containing sensitive data.
4141
- The upload flow is protected only by the `x-password` header - run behind HTTPS and/or restrict access with a firewall or reverse proxy for production deployments.
@@ -91,8 +91,8 @@ curl -X POST "http://localhost:8080/api/upload" \
9191
9292
## Upload handling and filename strategy
9393
94-
- Filenames are generated as: `${nanoid(this.filenameLength)}.${mimeSubtype}` where `mimeSubtype` is taken from the uploaded file's `mimetype.split("/")[1]`.
95-
- A collision safeguard checks whether a file with the generated name already exists and regenerates once if necessary. The probability of collision is extremely low with `nanoid`.
94+
- Filenames are generated as: `${nanoid(this.filenameLength)}.{ext}` where `ext` is the uploaded file's original extension.
95+
- A collision safeguard checks whether a file with the generated name already exists and regenerates once if necessary. The probability of collision is [extremely low](https://zelark.github.io/nano-id-cc/) with `nanoid`.
9696
9797
---
9898

0 commit comments

Comments
 (0)