nightbeat
Posts: 6
|
| Posted: 05/24/2006, 3:21 AM |
|
I want to use the file upload tool to store the PATH of uploaded files in the database, but it only stores the file's name, i tried editing the code but no luck, for example i want it to store "images/FILENAME" in the database field instead of just FILENAME , how can i append "images/" to the field.
Can someone please help me? 
|
 |
 |
peterr
Posts: 5971
|
| Posted: 05/24/2006, 3:42 PM |
|
I don't know the answer, but generally this is not supported because usually the path should not be stored in the database. Even in your own example "images/filename.gif" may work on some pages, but may not work on other pages and instead you may need the path "../images/filename.gif" on some pages, or "../../images/filename.gif" on other pages, etc.
So just store filenames in the database and add the appropriate path on the page where you want to display the file - depending on page location.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
materix
Posts: 161
|
| Posted: 05/24/2006, 5:11 PM |
|
Or store the path in a seperate text-field.
|
 |
 |
nightbeat
Posts: 6
|
| Posted: 05/24/2006, 7:45 PM |
|
ok fine, lets keep only the names in the database, but the problem is, that i want to display the images in a grid, now when i place the image control in the grid it asks for a table column that has the path to the image, what do i do? is there a way i can make the image control point to the folder where the images are stored, then it can just pick the names from the database and display the image!
waiting for ure reply!!
|
 |
 |
peterr
Posts: 5971
|
| Posted: 05/24/2006, 8:38 PM |
|
See: http://forums.codecharge.com/posts.php?post_id=64734
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
|