Ghost/core/server/controllers
jamesbloomer 3e28803672 Ensure image uploads do not overwrite if they have the same name
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)
2013-09-10 22:02:28 +01:00
..
admin.js Ensure image uploads do not overwrite if they have the same name 2013-09-10 22:02:28 +01:00
frontend.js Added redirect to get rid of /page/1/ 2013-09-09 18:32:44 +01:00