When you view the output of your uploaded file, are you doing something
like this:
<cfoutput> #FileName# </cfoutput>
If so, make it like this <cfoutput> #ServerFileName# </cfoutput>
If you would like some code for your upload template try this:
<cfif FileExists(image)>
<cffile
destination="/home/you_path_to_your_image_directory/web/pics/"
action="upload"
mode=757
nameconflict="overwrite"
filefield="image"
accept="image/jpg,image/jpeg,image/pjpeg">
<cfset image=#ServerFile#>
<cfquery datasource="your_source">
UPDATE your table
SET image='#ServerFile#'
WHERE ID ='#ID#'
</cfquery>
<cfelse>
Image not available
</cfif>
Note: The permission to the file is what ever you think is necessary.
Hope this helps -
Brett
At 11:07 AM 2/10/01 +1100, you wrote:
>Thanks to everyone who replied. My new page now has working BROWSE and
>UPLOAD buttons. However I've noticed one small CF bug during my testing.
>
>I'm a long term Unix/Linux user. It would be quite in order for a
>graphics file to be called green_frog However after it is uploaded
>using cffile, the file in the server directory is now called
>green_frog. notice the period at the end of the filename. The looks
>like a bit of legacy from the DOS/Windows roots of CF. How can I get
>this reported as a bug?
>
>Regards. Paul
>
>
>Jon Cline wrote:
> >
> > check the attributes of the cffile action=upload tag. it has
> everything you
> > want.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-linux%40houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_linux or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.