Skip to content

Commit aaf034b

Browse files
committed
Update README
1 parent 46a4fe1 commit aaf034b

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ Environment variables (will overwrite other server configs)
131131
| HMD_GOOGLE_CLIENTID | no example | Google API client id |
132132
| HMD_GOOGLE_CLIENTSECRET | no example | Google API client secret |
133133
| HMD_IMGUR_CLIENTID | no example | Imgur API client id |
134+
| HMD_IMAGE_UPLOAD_TYPE | `imgur`, `s3` or `filesystem` | Where to upload image. For S3, see our [S3 Image Upload Guide](docs/guides/s3-image-upload.md) |
135+
| HMD_S3_ACCESS_KEY_ID | no example | AWS access key id |
136+
| HMD_S3_SECRET_ACCESS_KEY | no example | AWS secret key |
137+
| HMD_S3_REGION | `ap-northeast-1` | AWS S3 region |
138+
| HMD_S3_BUCKET | no example | AWS S3 bucket name |
134139

135140
Server settings `config.json`
136141
---
@@ -166,6 +171,8 @@ Server settings `config.json`
166171
| heartbeatinterval | `5000` | socket.io heartbeat interval |
167172
| heartbeattimeout | `10000` | socket.io heartbeat timeout |
168173
| documentmaxlength | `100000` | note max length |
174+
| imageUploadType | `imgur`(default), `s3` or `filesystem` | Where to upload image
175+
| s3 | `{ "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", "secretAccessKey": "YOUR_S3_ACCESS_KEY", "region": "YOUR_S3_REGION", "bucket": "YOUR_S3_BUCKET_NAME" }` | When `imageUploadType` be setted to `s3`, you would also need to setup this key, check our [S3 Image Upload Guide](docs/guides/s3-image-upload.md) |
169176

170177
Third-party integration api key settings
171178
---

docs/guides/s3-image-upload.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,25 @@
5757
}
5858
```
5959

60+
8. Edit `config.json` and set following keys:
61+
62+
```javascript
63+
{
64+
"production": {
65+
...
66+
"imageUploadType": "s3",
67+
"s3": {
68+
"accessKeyId": "YOUR_S3_ACCESS_KEY_ID",
69+
"secretAccessKey": "YOUR_S3_ACCESS_KEY",
70+
"region": "YOUR_S3_REGION", // example: ap-northeast-1
71+
"bucket": "YOUR_S3_BUCKET_NAME"
72+
}
73+
}
74+
}
75+
```
76+
77+
9. In additional to edit `config.json` directly, you could also try [environment variable](https://github.com/hackmdio/hackmd#environment-variables-will-overwrite-other-server-configs).
78+
6079
## Related Tools
6180

6281
* [AWS Policy Generator](http://awspolicygen.s3.amazonaws.com/policygen.html)

0 commit comments

Comments
 (0)