so one module uploads a file and moves it to a temp directory, the other
module moves it from the temp directory to a real directory.  it sounds
like the file isn't fully moved over before the second module kicks in, or
like you say, module 1 still has a lock on it.

dumb question maybe, why not just move it straight to the required
directory in module 1?  skip the need for module 2 in the first place.



Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------



                                                                                       
                            
                    Mark Woods                                                         
                            
                    <[EMAIL PROTECTED]        To:     [EMAIL PROTECTED]                
                       
                    e.ie>                cc:                                           
                            
                                         Subject:     [ cf-dev ] odd cffile issue with 
CFMX                        
                    03/04/2003                                                         
                            
                    11:22                                                              
                            
                    Please                                                             
                            
                    respond to                                                         
                            
                    dev                                                                
                            
                                                                                       
                            
                                                                                       
                            



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]

Reply via email to