diff --git a/README.md b/README.md index 50be2eb..fb209b8 100755 --- a/README.md +++ b/README.md @@ -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 diff --git a/ass.js b/ass.js index a3df0bd..6372a01 100755 --- a/ass.js +++ b/ass.js @@ -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);