>- see footer for list info -<
try changing this:
<cfif #file.filewassaved# eq "yes"><!--- Was the small pic saved? --->
        <cfset smallpic = '#trim(file.serverfile)#'>
        <!---<cfdump var="#CFFILE#" label="Second upload">--->
</cfif>

you're setting a local variable that's called the same as your formfield.  but 
if the file wasn't saved, you're not setting it to an empty string or whatever. 
 this may be causing problems.  either change the name of your local variable, 
or add in an else statement so you can work out what's happening when it 
doesn't upload.


Duncan Cumming
New Media Developer
Customer Relations Management / Education
Fife Council
700 4105 / 01592 414105

>>> [EMAIL PROTECTED] 15/12/2006 09:42 >>>
>- see footer for list info -<
I extended the length of the fields in my database the other day and things 
now upload ok.

The problem I have now is that the picture upload isn't working correctly.

The file.serverfile variable contains some kind of junk .....

C:\CFusionMX\runtime\servers\default\SERVER-INF\temp\wwwroot-tmp\neotmp1636.tmp

where it should contain the name of the picture like 'christmas.jpg'

Again this all worked ok with IE6 its occouring with fire fox.


Here's my code ...


<CFTRY>
        <!--- UPLOAD THE PROPERTY DETAILS --->
        <cffile action ="UPLOAD"
        filefield ="details"
        nameconflict = "overwrite"
        accept = "application/pdf"
        destination = "#application.uploadDetails#">

<cfif #file.filewassaved# eq "yes"><!--- Were the details saved? --->
        <cfset details = '#file.serverfile#'>
        <!---<cfdump var="#CFFILE#" label="first upload">--->
</cfif>
<CFCATCH><CFSET errormessage = "Please enter a file"></CFCATCH>
</CFTRY>

<CFTRY>
<!--- UPLOAD THE SMALL PROPERTY PICTURE --->
<cffile action ="UPLOAD"
filefield ="smallpic"
nameconflict = "overwrite"
accept = "image/jpg, image/pjpeg"
destination = "#application.UploadDirectory#">
<cfif #file.filewassaved# eq "yes"><!--- Was the small pic saved? --->
        <cfset smallpic = '#trim(file.serverfile)#'>
        <!---<cfdump var="#CFFILE#" label="Second upload">--->
</cfif>
<CFCATCH><CFSET errormessage = "Please enter a file"></CFCATCH>
</CFTRY>


<!--- Add the property to the database --->
<CFQUERY NAME="AddProperty" datasource="#application.DSN#">
                        INSERT INTO tblPropertyDetails
                                (NoBedroomsIDFK,
                                PropertyTypeIDFK,
                                PropertyLocationIDFK,
                                RoadName,
                                Picture,
                                Description1,
                                Description2,
                                Description3,
                                Description4,
                                Description5,
                                Description6,
                                SellingPrice,
                                PostCode,
                                PDFDetails)
                        VALUES
                                ('#form.Select_Bedrooms#',
                                '#form.Select_Type#',
                                '#form.Select_Location#',
                                '#trim(form.RoadName)#',
                                '#trim(smallpic)#',
                                '#trim(form.Description1)#',
                                '#trim(form.Description2)#',
                                '#trim(form.Description3)#',
                                '#trim(form.Description4)#',
                                '#trim(form.Description5)#',
                                '#trim(form.Description6)#',
                                CAST('#FORM.SellingPrice#' AS MONEY),
                                '#trim(PostCode)#',
                                '#trim(Details)#')
                                SELECT @@IDENTITY AS NewID
                </CFQUERY>

Can anyone see why the file.serverfile variable doesn't contain the name of 
the picture please. IS there someting else I need to do?

Regards - Paul


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo 

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<


**********************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed and 
should not be disclosed to any other party. 
If you have received this email in error please notify your system manager and 
the sender of this message.

This email message has been swept for the presence of computer viruses but no 
guarantee is given that this e-mail message and any attachments are free from 
viruses.

Fife Council
Tel: 08451 55 00 00
************************************************

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to