creating a directory before using cffile


i'm having trouble using cffile right before create directory. using cffileupload tag , url attribute page has following code. code below creates new directory , uploads images directory. however, fails on 2nd upload , 500 error in cffileupload flash object. however, if hardcode directory path, upload fine. know why having problem?

 

<!--- user upload images temp directory based on date , time --->

<cfset uploadfolderpath = "c:\coldfusion9\wwwroot\myapplication\uploads\" />

<cfset date=dateformat(now(),'mm-dd-yyyy_') />

<cfset time=timeformat(now(),'hh-mm-ss') />

<cfset newfoldername = "upload_" & date & time />

<cfset newfolder = uploadfolderpath & newfoldername />

<cfdirectory action = "create" directory="#newfolder#" />

 

<cffile action="uploadall" destination="#newfolder#" nameconflict="makeunique" />

if there no other error details, check logs full error message, or alternately trap errors cftry/cfcatch , save them file.



More discussions in ColdFusion


adobe

Comments

Popular posts from this blog

How to decompile jsxbin to jsx

Gavik Photoslide GK2: Not able to upload photos - Joomla! Forum - community, help and support

Phoca Guestbook logger registret bruger af - Joomla! Forum - community, help and support