Last post Dec 30, 2007 10:22 PM by sonyerik
Nov 25, 2007 02:41 AM|sonyerik|LINK
As you all know, you can choose from storing photos of the items in the database or in the upload folder. I am using upload folder.
I think it would be much better if when you upload photos for an add, a new sub-folder is created within the main upload folder, gives it an unique name automatically (auto-numbering or uses user name as a name of the folder) and stores all the photos from
one user in this dedicated sub-folder.
Normally, when people upload photos for the add, they are auto-numbered and three different sizes of the same photo are stored one after another.
It is ok but when the users change the photos or upload more photos later, all the photos get mixed. So that is my idea that all the photos from the same user, no matter if they are uploaded all at once or not, are stored in certain user's folder.
I hope it makes sens and please, if any body has implemented it already or has a clue how to achieve it, I would be appreciated a lot.
Thanks for any help
Nov 25, 2007 11:47 PM|ashmetry|LINK
I implemented that exactly the way you describe it, I have a folder with the name of the user that contains all the photos for that user.
Its not that hard to implement.
What do u need to know.
Nov 26, 2007 03:56 AM|sonyerik|LINK
I just need to know how to implement it :-)
Sorry but I am still learning ASP and VB. What places do you need to change the code? Could you please share the code?
I would be appreciate if you wrote some more about it.
Nov 27, 2007 02:00 PM|ashmetry|LINK
In BLL\Photos.cs (vb)
the method GetFilePath returns the local path where the files will be saved. You can change that to return the path as a subdirectory of Profile.Username.
Dec 30, 2007 10:22 PM|sonyerik|LINK
I keep trying to figure it out with the subfolders but it still does not work for me. Would you be so kind and share your BLL\Photos.vb (cs) file please.
I will be grateful for any help. Thank you.