0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core
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
..
client Add breakpoint to switch to mobile friendly form layout 2013-09-10 13:30:06 -03:00
server Ensure image uploads do not overwrite if they have the same name 2013-09-10 22:02:28 +01:00
shared Further improvements to markdown implementation 2013-09-09 22:55:32 +01:00
test Ensure image uploads do not overwrite if they have the same name 2013-09-10 22:02:28 +01:00
ghost.js Added blog cover image 2013-09-09 18:13:19 +01:00
README.md App restructure - closes #245 2013-07-11 20:23:34 +01:00

Core

Core contains the bread and butter of ghost. It is currently divided up into:

  • client - the assets, helpers, models, view and templates for rendering the admin panel backbone app
  • server - the controllers & helpers for driving the server side app along with the model, api, and data
  • shared - just contains lang for now, although it's not shared yet, more stuff should go here soon like handlebars helpers
  • test - contains unit tests and a set of html prototypes of the admin UI. Really, this folder should reflect all of core
  • ghost.js - currently both the glue that binds everything together and what gives us the API for registering themes and plugins. The initTheme function is a bit of a hack which lets us serve different views & static content up for the admin & blog

This structure is by no means final and recommendations are more than welcome.