If I want each user in my web app to be able to upload about 6 pictures with a description, wh开发者_JAVA技巧at is the best way to store that info in the db?
How would you do it?
i would save the image files to a location in the file system. then, keep a database table for images that contains id, filepath, description. you may also want to keep other info in the image table as well, for instance, which user the image belongs to, and which is the main image, width, height, etc.
精彩评论