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]