doesn't help, thanks all the same

surround each cffile call with its own named lock, both of which should have
the same name (you can use the name fo the file, or a generic name such as
'fillock' if you like). This will ensure that the two filesystem operations
don't overrun.

eg.

<cflock name="filelock" blah blah>
        <cffile action="upload" blah blah>
</cflock>

<cflock name="filelock" blah blah>
        <cffile action="move" blah blah>
</cflock>

> -----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]



Reply via email to