Starsky Posted June 16, 2007 Share Posted June 16, 2007 Greeting guys In my attempt not to forget php I am playing around with an idea of creating a multiuser gallery, where people can post images and view them. If you think that something can be done in a better way or maybe there are better practices of doing something similar out there I'd appreciate your advice. Here's how I see it done: *Every user will have a separate directory to save files(images). That means every time a user registers a directory is created with a name that matches the user's username. if auser is deleted, than the directory is deleted along with it's content. *Every time user uploads an image, it will be stored in user directory with a name like: 2007-03-12-23-43-11.jpg (to make sure user cant oveerwrite a file. the real filename will be stored in the database. Every time user uploads an image a thumbnail will be created on the server and saved in user folder along with the original image with the prefix "thumb-", example: thumb-2007-03-12-23-43-11.jpg. *when user will browse the images the thumbnails will be displaied. whne clickedon the thumbnail the large original image will be loaded. Do you think this is the right way to head to? Any suggestins? Ideas? Thank you for reading through. Would appreciate your contribution Quote Link to comment https://forums.phpfreaks.com/topic/55881-creating-multiuser-image-gallery-need-advice-on-concepts/ Share on other sites More sharing options...
pocobueno1388 Posted June 16, 2007 Share Posted June 16, 2007 *Every user will have a separate directory to save files(images). That means every time a user registers a directory is created with a name that matches the user's username. if auser is deleted, than the directory is deleted along with it's content. I really don't know what the best way of doing this is, but here is how I would go about it. Just make a SINGLE folder for ALL uploaded images to go into. The filename to each image uploaded will be stored in the database, along with which user uploaded it. To display an image from the database, you just simply have to type out the path to the folder the images is stored in, then tack on the filename to the end from the DB. I just see this method easier because it will be much easier to keep track and pull information from. Then again, I have no idea which way is better....we will leave that to one of the PHP gurus to answer. Quote Link to comment https://forums.phpfreaks.com/topic/55881-creating-multiuser-image-gallery-need-advice-on-concepts/#findComment-276072 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.