added `X-Ass-Gfycat` header to change adjective length

pull/19/head
tycrek 3 years ago
parent ecdebf73ad
commit bc78e821d8
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -93,6 +93,7 @@ If you need to override a specific part of the config to be different from the g
| ------ | ------- |
| **`X-Ass-Domain`** | Override the domain returned for the clipboard (useful for multi-domain hosts) |
| **`X-Ass-Access`** | Override the generator used for the resource URI. Must be one of: `original`, `zws`, `gfycat`, or `random` ([see above](#access-types)) |
| **`X-Ass-Gfycat`** | Override the length of Gfycat ID's. Defaults to `2` |
### Fancy embeds

@ -133,7 +133,7 @@ function startup() {
};
// Save the file information
let resourceId = generateId(generator, resourceIdSize, gfyIdSize, req.file.originalname);
let resourceId = generateId(generator, resourceIdSize, req.headers['x-ass-gfycat'] || gfyIdSize, req.file.originalname);
data[resourceId.split('.')[0]] = req.file;
saveData(data);

Loading…
Cancel
Save