Hi,
I have spent ages checking the forum for this solution, AND tried all of your suggestions..but I am still getting TMP filenaming problems! I.E the server will upload the file absolutely fine. I can do a check using file.serverfile and see it is there...but Cfmail will NOT attach the uploaded file!
I can't beleive how straightforward this should be!! I have spent too long on this now...please any help would be appreciated before I go mad.
Error message: "The resource CDU files.doc was not found.
The root cause was: null."
I want to create a form that allows user to upload file from local or network machine.. I then use CFFILE to upload this to the CF server in c:\temp. I then want to grab this file from C:\temp and attach using CFMAIL and CFMAILPARAM FILE=""
I am using CF MX on Windows 2000.
In a previous post, someone suggested that using CFPARAMMAIL with #file.serverfile# was all that was required. Well I have tried this and I still get an error because it only recognises the file as "neotmp7681.tmp"!!?
My form code:
<form action="../../../../cfusion/Forms/upload.cfm" method="post" enctype="multipart/form-data">
<input type="file" name="filepath">
<input type="submit">
</form>
Form action page:
<CFFILE
action="upload"
nameconflict="overwrite"
filefield="filepath"
destination="c:\temp">
<CFOUTPUT>
<cfset fileUploaded = #file.serverfile#>
Uploaded File:#fileUploaded#
<cfset filename = GetFileFromPath(Form.filepath)>
<br>filename= #filename#
</CFOUTPUT>
<cfmail to="xxx@xxx.xxx" from="extranet@xx.xxx" subject="File attachments Test" type="HTML">
<cfmailparam file=#file.serverfile#>
</cfmail>
Please any pointers?
Thanks
Emma
I have spent ages checking the forum for this solution, AND tried all of your suggestions..but I am still getting TMP filenaming problems! I.E the server will upload the file absolutely fine. I can do a check using file.serverfile and see it is there...but Cfmail will NOT attach the uploaded file!
I can't beleive how straightforward this should be!! I have spent too long on this now...please any help would be appreciated before I go mad.
Error message: "The resource CDU files.doc was not found.
The root cause was: null."
I want to create a form that allows user to upload file from local or network machine.. I then use CFFILE to upload this to the CF server in c:\temp. I then want to grab this file from C:\temp and attach using CFMAIL and CFMAILPARAM FILE=""
I am using CF MX on Windows 2000.
In a previous post, someone suggested that using CFPARAMMAIL with #file.serverfile# was all that was required. Well I have tried this and I still get an error because it only recognises the file as "neotmp7681.tmp"!!?
My form code:
<form action="../../../../cfusion/Forms/upload.cfm" method="post" enctype="multipart/form-data">
<input type="file" name="filepath">
<input type="submit">
</form>
Form action page:
<CFFILE
action="upload"
nameconflict="overwrite"
filefield="filepath"
destination="c:\temp">
<CFOUTPUT>
<cfset fileUploaded = #file.serverfile#>
Uploaded File:#fileUploaded#
<cfset filename = GetFileFromPath(Form.filepath)>
<br>filename= #filename#
</CFOUTPUT>
<cfmail to="xxx@xxx.xxx" from="extranet@xx.xxx" subject="File attachments Test" type="HTML">
<cfmailparam file=#file.serverfile#>
</cfmail>
Please any pointers?
Thanks
Emma