0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/server
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
..
controllers Ensure image uploads do not overwrite if they have the same name 2013-09-10 22:02:28 +01:00
data Changing icon setting to cover in defaults 2013-09-10 20:05:35 +01:00
helpers Added redirect to get rid of /page/1/ 2013-09-09 18:32:44 +01:00
models Temporary aliasing on the User model 2013-09-09 15:25:20 +01:00
permissions Edit Post Permissions 2013-08-18 12:28:05 -05:00
plugins Improving the use of paths in Ghost 2013-08-12 15:37:23 +01:00
views Removed unused user menu items and linked "Help / Support" to the right place 2013-09-10 15:05:42 +01:00
api.js Merge pull request #587 from javorszky/iss288 2013-09-02 15:44:48 -07:00
errorHandling.js
mail.js Mail settings are per environment 2013-09-04 16:15:21 +01:00
require-tree.js JSLint fixes for new version 2013-07-31 09:21:22 +01:00