Ok, how about this approach: Have the ftp client always upload the file
using the same name (I assume you're doing this now, so no changes
there). Instead of referencing this file in your CF page, have the CF
template look for and rename the uploaded file (if found), then use the
new file name in your html output. The file that the webcam ftp client
uploads will never be locked. The question now is whether CF will
encounter the same IIS file locking problems, but I think it may be able
to get around them.
<cfset PicPath = "d:\web\site\pics">
<cfset UploadedPic = "somepic.jpg">
<cfset DisplayPic = "somepic0.jpg">
<cfif FileExists("#PicPath#\#UploadedPic#")>
<cfif FileExists("#PicPath#\#DisplayPic#")>
<cffile action="delete"
file="#PicPath#\#DisplayPic#">
</cfif>
<cffile action="rename"
source="#PicPath#\#UploadedPic#"
destination="#PicPath#\#DisplayPic#">
</cfif>
<cfoutput><img src="\pics\#DisplayPic#"></cfoutput>
Jim
-----Original Message-----
From: David E. Crawford <[EMAIL PROTECTED]>
To: Jim McAtee <[EMAIL PROTECTED]>; [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: Thursday, August 31, 2000 11:22 AM
Subject: RE: IIS "Locking" Files
>Re: IIS "Locking" FilesWell, I would, except that I am using the FTP
client
>builtin to WebCAM32 and it is not as flexible. I don't want to write a
>complete application around this.
>
>DC
>
> -----Original Message-----
> From: Jim McAtee [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 31, 2000 16:43
> To: [EMAIL PROTECTED]
> Cc: David E. Crawford
> Subject: Re: IIS "Locking" Files
>
>
> Dave,
>
> You might also try a different approach to naming the uploaded files.
> If possible, have your webcam upload the images with a unique
filename.
> For example, instead of uploading as "thispic.jpg", append a
timestamp,
> as in "thispic1405.jpg". Your CF template that displays the image
could
> do a CFDIRECTORY using a filter of "thispic*.jpg", sort by date
> (descending), and then select the latest image. Clean out the
directory
> as needed. Definitely a bit more work, but you wouldn't have to
disable
> anything in IIS.
>
> Jim
>
>
>
> -----Original Message-----
> From: David E. Crawford <[EMAIL PROTECTED]>
> To: CF-Talk <[EMAIL PROTECTED]>
> Date: Thursday, August 31, 2000 6:42 AM
> Subject: IIS "Locking" Files
>
>
>
> >A while back there was some discussion of a registry hack which
would
> allow
> >the disabling of the "lock" that IIS places on files during "read"
> >operations. I understand that it may have a bearing on performance,
> >however, I am in a situation where I am ftp'ng webcam images into a
> >directory, which are then "called" via CFM template. Unfortunately
the
> >browser access to the files appears to be placing an exclusive lock
on
> the
> >file, which means the FTP process is failing.
> >
> >Does anyone recall the technique used to defeat this "feature" of
IIS?
> >
> >Dave
> >---------------------------
> >David E. Crawford
> >Director, Internet Development
> >Yale Security Group, Inc.
> >www.yalesecurity.com
>
>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.