Gossamer Forum
Home : Products : DBMan : Customization :

multiple file upload, captions work, but wont save filename into DB

Quote Reply
multiple file upload, captions work, but wont save filename into DB
I am hoping that someone can help me in this issue

i have the multiple file upload mod working perfectly. the only thing is that i want to store the filename without any relative paths into the database field. I have searched and searched and only found the thread about thecaptions. The captions work fine on the mod, but i cant seem to be able to save the filename.

then only chance i have had to save the filename is by using some javascript that will copy the text of the FILE field in the form.

liek this

<tr>
<td width="400" colspan=2>Add Photo$u:
<input type="file" name="file-to-upload-$u" size="50" onChange="this.form.IMAGE$u.value=this.value;">

<br><input type="hidden" name="IMAGE$u" value="">
Photo Caption:

<input type="TEXT" name="CAPTION$u" size="50">
</td>
</tr>

the problem is that copies everything in that field, which includes the c:\directory\directory\file.jpg

is there an easier way to call that through the script. or can it be done when the upload is completed, that it will automatically save the filename into the database.

thanks in advance
Jose