Try doing a <CFWAIT> before reading the file u moved.
> -----Original Message----- > From: Mark Woods [mailto:[EMAIL PROTECTED] > Sent: 03 April 2003 12:42 > To: [EMAIL PROTECTED] > Subject: RE: [ cf-dev ] odd cffile issue with CFMX > > > I've wrapped all the cffile calls within locks with the same > name and the > problem remains. > > As a quick fix, I'm trying the move in my contentPut module and if an > exception is caught, copying instead. > > Thanks > > Mark > > >try putting both within a named lock called fileupload > > > ><CFLOCK name="fileupload" timeout="30"> > > > >first call > > > >second call (this one shouldnt start until first completed) > > > ></CFLOCK> > > > >Alex > > > >-----Original Message----- > >From: Mark Woods [mailto:[EMAIL PROTECTED] > >Sent: 03 April 2003 11:22 > >To: [EMAIL PROTECTED] > >Subject: [ cf-dev ] odd cffile issue with CFMX > > > > > >I'm having some weird problems with cffile and cfmx, the code worked > >fine with cf5... > > > >I'm uploading a file by posting to a cf template that runs > two modules > >for each uploaded file, readFormField and contentPut. > > > >readFormField uploads the file and moves it to the temp > directory for > >that application. This works fine every time, the file is always > >uploaded and moved successfully. > > > >contentPut checks the temp directory for a matching uploaded > file and > >moves it to it's destination directory (a secure or public assets > >directory). This part fails most of the time but not always. > > > >I get a cffile error... > >Attribute validation error for tag CFFILE. The value of the > attribute > >source, which is currently "blah", is invalid. > > > >Now, I've done some debugging, and the source file and destination > >directories exist even when I get this error. Also, if I re-post the > >form a few times it'll eventually work. And, if I change the action > >attribute of cffile from "move" to "copy" it works fine every time. > > > >My guess is that it's something to do with the fact that I have two > >modules running for the uploaded files and readFormField > still has the > >file locked for writing while contentPut is trying to move it. Well, > >the file always exists and copying it works fine, but I need > to move it > >or else I'm left with rubbish in my temp directory. > > > >Anyone got any idea how I'm going to solve this without some ugly > >workaround like a scheduled temp cleanup? > > > > > >Thanks > > > >Mark > > > > > > > > > >-- > >** Archive: > http://www.mail-archive.com/dev%> 40lists.cfdeveloper.co.uk/ > > > > >To unsubscribe, e-mail: > [EMAIL PROTECTED] > >For additional commands, e-mail: > [EMAIL PROTECTED] For > >human help, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > >-- > >** Archive: > http://www.mail-archive.com/dev%> 40lists.cfdeveloper.co.uk/ > > > > >To unsubscribe, e-mail: > [EMAIL PROTECTED] > >For additional commands, e-mail: > [EMAIL PROTECTED] For > >human help, e-mail: [EMAIL PROTECTED] > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]