I am creating my web application and need your suggestion about organizing media files and folders. So what I have right now is structure like this:
In the root I have folder images/myappName/ where I am going to save all files related to this application. This application will have different posts and each post can have few images (6~10), so I don't know how properly do the saving part. I have two options:
1) I can create each folder for each post, name them their ID, in images/myappName/ and save images for each post under their folder, something like if post's id is 1154 image container folder will be images/myappName/1154/example.jpg
2) Save all images at the same location, but their name will start by their ID. Something like if post ID is 1154 the image names will be images/myappName/1154_example.jpg
So what do you recommend guys? Which one is better option, what downsides each option can have and what else can you recommend?