Upload file, save to database, retrieve file.
Posted: Sat Feb 19, 2011 11:51 am
Here is what I am trying to accomplish. I want to create a backend for my client to use that will allow the following:
1. Allow them upload a max of 5 photos
2. The first photo will resize as a thumbnail, medium size and large size files into different folders
3. The other photos will save as medium and large size files in their respective folders
4. The names of each photo will save into a database (I will need to only call the medium photo sometimes)
So far I can do the multiple file upload, resize, and save into their respective folders using arrays and the foreach loop.
The challenge I am running into is that I can't figure out how to save the file/location to a separate column in a database (ie. thumbnail, medium, large).
Any suggestions?
1. Allow them upload a max of 5 photos
2. The first photo will resize as a thumbnail, medium size and large size files into different folders
3. The other photos will save as medium and large size files in their respective folders
4. The names of each photo will save into a database (I will need to only call the medium photo sometimes)
So far I can do the multiple file upload, resize, and save into their respective folders using arrays and the foreach loop.
The challenge I am running into is that I can't figure out how to save the file/location to a separate column in a database (ie. thumbnail, medium, large).
Any suggestions?