This is a multi-part message in MIME format.

------=_NextPart_000_0144_01C01413.304ED220
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Re: IIS "Locking" FilesI have taken a brute force approach using CFFILE and
CREATEUUID() to just flood the directory with pictures.  Seems to be
working.

Thanks.

Dave

  -----Original Message-----
  From: Jim McAtee [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, August 31, 2000 19:50
  To: David E. Crawford; [EMAIL PROTECTED]
  Subject: Re: IIS "Locking" Files


  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/cf-talk@houseoffusion.com/
  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.


------=_NextPart_000_0144_01C01413.304ED220
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Re: IIS "Locking" Files</TITLE>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3018.900" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D960334912-01092000>I have=20
taken a brute force approach using CFFILE and CREATEUUID() to just flood =
the=20
directory with pictures.&nbsp; Seems to be working.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D960334912-01092000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D960334912-01092000>Thanks.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D960334912-01092000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D960334912-01092000>Dave</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D960334912-01092000></SPAN></FONT>&nbsp;</DIV>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
  <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Jim McAtee=20
  [mailto:[EMAIL PROTECTED]]<BR><B>Sent:</B> Thursday, August 31, =
2000=20
  19:50<BR><B>To:</B> David E. Crawford;=20
  [EMAIL PROTECTED]<BR><B>Subject:</B> Re: IIS "Locking"=20
  Files<BR><BR></DIV></FONT>
  <P><FONT size=3D2>Ok, how about this approach:&nbsp; Have the ftp =
client always=20
  upload the file</FONT> <BR><FONT size=3D2>using the same name (I =
assume you're=20
  doing this now, so no changes</FONT> <BR><FONT size=3D2>there).&nbsp; =
Instead of=20
  referencing this file in your CF page, have the CF</FONT> <BR><FONT=20
  size=3D2>template look for and rename the uploaded file (if found), =
then use=20
  the</FONT> <BR><FONT size=3D2>new file name in your html output.&nbsp; =
The file=20
  that the webcam ftp client</FONT> <BR><FONT size=3D2>uploads will =
never be=20
  locked.&nbsp; The question now is whether CF will</FONT> <BR><FONT=20
  size=3D2>encounter the same IIS file locking problems, but I think it =
may be=20
  able</FONT> <BR><FONT size=3D2>to get around them.</FONT> </P>
  <P><FONT size=3D2>&lt;cfset PicPath =3D "d:\web\site\pics"&gt;</FONT> =
<BR><FONT=20
  size=3D2>&lt;cfset UploadedPic =3D "somepic.jpg"&gt;</FONT> <BR><FONT=20
  size=3D2>&lt;cfset DisplayPic =3D "somepic0.jpg"&gt;</FONT> </P>
  <P><FONT size=3D2>&lt;cfif =
FileExists("#PicPath#\#UploadedPic#")&gt;</FONT>=20
  <BR><FONT size=3D2>&nbsp; &lt;cfif=20
  FileExists("#PicPath#\#DisplayPic#")&gt;</FONT> <BR><FONT=20
  size=3D2>&nbsp;&nbsp;&nbsp; &lt;cffile action=3D"delete"</FONT> =
<BR><FONT=20
  =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
  file=3D"#PicPath#\#DisplayPic#"&gt;</FONT> <BR><FONT size=3D2>&nbsp;=20
  &lt;/cfif&gt;</FONT> <BR><FONT size=3D2>&nbsp; &lt;cffile =
action=3D"rename"</FONT>=20
  <BR><FONT =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  source=3D"#PicPath#\#UploadedPic#"</FONT> <BR><FONT=20
  size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  destination=3D"#PicPath#\#DisplayPic#"&gt;</FONT> <BR><FONT=20
  size=3D2>&lt;/cfif&gt;</FONT> </P>
  <P><FONT size=3D2>&lt;cfoutput&gt;&lt;img=20
  src=3D"\pics\#DisplayPic#"&gt;&lt;/cfoutput&gt;</FONT> </P>
  <P><FONT size=3D2>Jim</FONT> </P><BR>
  <P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT =
size=3D2>From: David=20
  E. Crawford &lt;[EMAIL PROTECTED]&gt;</FONT> <BR><FONT =
size=3D2>To: Jim=20
  McAtee &lt;[EMAIL PROTECTED]&gt;; =
[EMAIL PROTECTED]</FONT>=20
  <BR><FONT size=3D2>&lt;[EMAIL PROTECTED]&gt;</FONT> <BR><FONT=20
  size=3D2>Date: Thursday, August 31, 2000 11:22 AM</FONT> <BR><FONT=20
  size=3D2>Subject: RE: IIS "Locking" Files</FONT> </P><BR>
  <P><FONT size=3D2>&gt;Re: IIS "Locking" FilesWell, I would, except =
that I am=20
  using the FTP</FONT> <BR><FONT size=3D2>client</FONT> <BR><FONT=20
  size=3D2>&gt;builtin to WebCAM32 and it is not as flexible.&nbsp; I =
don't want=20
  to write a</FONT> <BR><FONT size=3D2>&gt;complete application around=20
  this.</FONT> <BR><FONT size=3D2>&gt;</FONT> <BR><FONT =
size=3D2>&gt;DC</FONT>=20
  <BR><FONT size=3D2>&gt;</FONT> <BR><FONT size=3D2>&gt;&nbsp; =
-----Original=20
  Message-----</FONT> <BR><FONT size=3D2>&gt;&nbsp; From: Jim McAtee [<A =

  =
href=3D"mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]<=
/A>]</FONT>=20
  <BR><FONT size=3D2>&gt;&nbsp; Sent: Thursday, August 31, 2000 =
16:43</FONT>=20
  <BR><FONT size=3D2>&gt;&nbsp; To: [EMAIL PROTECTED]</FONT> =
<BR><FONT=20
  size=3D2>&gt;&nbsp; Cc: David E. Crawford</FONT> <BR><FONT =
size=3D2>&gt;&nbsp;=20
  Subject: Re: IIS "Locking" Files</FONT> <BR><FONT size=3D2>&gt;</FONT> =
<BR><FONT=20
  size=3D2>&gt;</FONT> <BR><FONT size=3D2>&gt;&nbsp; Dave,</FONT> =
<BR><FONT=20
  size=3D2>&gt;</FONT> <BR><FONT size=3D2>&gt;&nbsp; You might also try =
a different=20
  approach to naming the uploaded files.</FONT> <BR><FONT =
size=3D2>&gt;&nbsp; If=20
  possible, have your webcam upload the images with a unique</FONT> =
<BR><FONT=20
  size=3D2>filename.</FONT> <BR><FONT size=3D2>&gt;&nbsp; For example, =
instead of=20
  uploading as "thispic.jpg", append a</FONT> <BR><FONT =
size=3D2>timestamp,</FONT>=20
  <BR><FONT size=3D2>&gt;&nbsp; as in "thispic1405.jpg".&nbsp; Your CF =
template=20
  that displays the image</FONT> <BR><FONT size=3D2>could</FONT> =
<BR><FONT=20
  size=3D2>&gt;&nbsp; do a CFDIRECTORY using a filter of "thispic*.jpg", =
sort by=20
  date</FONT> <BR><FONT size=3D2>&gt;&nbsp; (descending), and then =
select the=20
  latest image.&nbsp; Clean out the</FONT> <BR><FONT =
size=3D2>directory</FONT>=20
  <BR><FONT size=3D2>&gt;&nbsp; as needed.&nbsp; Definitely a bit more =
work, but=20
  you wouldn't have to</FONT> <BR><FONT size=3D2>disable</FONT> =
<BR><FONT=20
  size=3D2>&gt;&nbsp; anything in IIS.</FONT> <BR><FONT =
size=3D2>&gt;</FONT>=20
  <BR><FONT size=3D2>&gt;&nbsp; Jim</FONT> <BR><FONT =
size=3D2>&gt;</FONT> <BR><FONT=20
  size=3D2>&gt;</FONT> <BR><FONT size=3D2>&gt;</FONT> <BR><FONT =
size=3D2>&gt;&nbsp;=20
  -----Original Message-----</FONT> <BR><FONT size=3D2>&gt;&nbsp; From: =
David E.=20
  Crawford &lt;[EMAIL PROTECTED]&gt;</FONT> <BR><FONT =
size=3D2>&gt;&nbsp;=20
  To: CF-Talk &lt;[EMAIL PROTECTED]&gt;</FONT> <BR><FONT=20
  size=3D2>&gt;&nbsp; Date: Thursday, August 31, 2000 6:42 AM</FONT> =
<BR><FONT=20
  size=3D2>&gt;&nbsp; Subject: IIS "Locking" Files</FONT> <BR><FONT=20
  size=3D2>&gt;</FONT> <BR><FONT size=3D2>&gt;</FONT> <BR><FONT =
size=3D2>&gt;</FONT>=20
  <BR><FONT size=3D2>&gt;&nbsp; &gt;A while back there was some =
discussion of a=20
  registry hack which</FONT> <BR><FONT size=3D2>would</FONT> <BR><FONT=20
  size=3D2>&gt;&nbsp; allow</FONT> <BR><FONT size=3D2>&gt;&nbsp; &gt;the =
disabling=20
  of the "lock" that IIS places on files during "read"</FONT> <BR><FONT=20
  size=3D2>&gt;&nbsp; &gt;operations.&nbsp; I understand that it may =
have a=20
  bearing on performance,</FONT> <BR><FONT size=3D2>&gt;&nbsp; =
&gt;however, I am=20
  in a situation where I am ftp'ng webcam images into a</FONT> <BR><FONT =

  size=3D2>&gt;&nbsp; &gt;directory, which are then "called" via CFM=20
  template.&nbsp; Unfortunately</FONT> <BR><FONT size=3D2>the</FONT> =
<BR><FONT=20
  size=3D2>&gt;&nbsp; &gt;browser access to the files appears to be =
placing an=20
  exclusive lock</FONT> <BR><FONT size=3D2>on</FONT> <BR><FONT =
size=3D2>&gt;&nbsp;=20
  the</FONT> <BR><FONT size=3D2>&gt;&nbsp; &gt;file, which means the FTP =
process=20
  is failing.</FONT> <BR><FONT size=3D2>&gt;&nbsp; &gt;</FONT> <BR><FONT =

  size=3D2>&gt;&nbsp; &gt;Does anyone recall the technique used to =
defeat this=20
  "feature" of</FONT> <BR><FONT size=3D2>IIS?</FONT> <BR><FONT =
size=3D2>&gt;&nbsp;=20
  &gt;</FONT> <BR><FONT size=3D2>&gt;&nbsp; &gt;Dave</FONT> <BR><FONT=20
  size=3D2>&gt;&nbsp; &gt;---------------------------</FONT> <BR><FONT=20
  size=3D2>&gt;&nbsp; &gt;David E. Crawford</FONT> <BR><FONT =
size=3D2>&gt;&nbsp;=20
  &gt;Director, Internet Development</FONT> <BR><FONT =
size=3D2>&gt;&nbsp; &gt;Yale=20
  Security Group, Inc.</FONT> <BR><FONT size=3D2>&gt;&nbsp;=20
  &gt;www.yalesecurity.com</FONT> <BR><FONT size=3D2>&gt;</FONT> =
<BR><FONT=20
  size=3D2>&gt;</FONT> </P>
  <P><FONT=20
  =
size=3D2>----------------------------------------------------------------=
--------------</FONT>=20
  <BR><FONT size=3D2>Archives: <A=20
  href=3D"http://www.mail-archive.com/cf-talk@houseoffusion.com/"=20
  =
target=3D_blank>http://www.mail-archive.com/cf-talk@houseoffusion.com/</A=
></FONT>=20
  <BR><FONT size=3D2>To Unsubscribe visit <A=20
  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf_talk"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf_talk</A>=20
  or send a message to [EMAIL PROTECTED] with =
'unsubscribe' in=20
  the body.</FONT></P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0144_01C01413.304ED220--

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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.

Reply via email to