I have a photo upload processor that looks like this..
<form action="addphoto.cfm?Save=" enctype="multipart/form-data" method="post">
<input type="file" name="photo">
<input type="text" name="caption" size="25" maxlength="200">
</form>
The update/insert query is as follows:
<cffile action="UPLOAD" filefield="Photo" destination="/home/kelani/public_html/dir_to/photos" nameconflict="MAKEUNIQUE">
<cfquery name="db_insert" datasource="dbname" dbtype="ODBC" username="username" password="pswd" dbserver="localhost" dbname="dbname">
UPDATE users SET photo='#form.photo#', cap='#cap#' WHERE ID='#form.id#'
</cfquery>
the file uploads to the correct directory, but the link in my table is always defaulting to
/var/tmp/filename.jpg
What am I missing here?
kelani
<form action="addphoto.cfm?Save=" enctype="multipart/form-data" method="post">
<input type="file" name="photo">
<input type="text" name="caption" size="25" maxlength="200">
</form>
The update/insert query is as follows:
<cffile action="UPLOAD" filefield="Photo" destination="/home/kelani/public_html/dir_to/photos" nameconflict="MAKEUNIQUE">
<cfquery name="db_insert" datasource="dbname" dbtype="ODBC" username="username" password="pswd" dbserver="localhost" dbname="dbname">
UPDATE users SET photo='#form.photo#', cap='#cap#' WHERE ID='#form.id#'
</cfquery>
the file uploads to the correct directory, but the link in my table is always defaulting to
/var/tmp/filename.jpg
What am I missing here?
kelani