mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 09:52:09 +03: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) |
||
---|---|---|
.. | ||
admin.js | ||
frontend.js |