mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
3e28803672
closes #619 - check if uploaded image name exists in month/year path - if unique then save - if not unique then add -1 to the end of the name eg. image-1.jpg - if image-1.jpg exists then increment to -2 - keep going until a unique name is found - uses tail recursion as normal path will be to save the first filename and deep recursion will be the exception - (the alternative of loading the names of all the files in the directory could result in a large in memory array) |
||
---|---|---|
.. | ||
controllers | ||
data | ||
helpers | ||
models | ||
permissions | ||
plugins | ||
views | ||
api.js | ||
errorHandling.js | ||
mail.js | ||
require-tree.js |