2 Replies Latest reply on Jan 26, 2009 1:53 PM by bigbrain28

    Issues with CFFILE and CFIMAGE together

      Why after several months would a page just cease to work when it has not been touched?

      This code;
      <cfif len('#form.p2#') NEQ 0>

      <cffile action="upload"
      <!---Resize input image--->
      <cfimage action="convert"
      <cffile action="delete" file="#path#/PropertyListings/PLpics/#URL.ID#img/#File.serverFile#">

      checks if a formfield submitted has a file in it, uploads it, alters its size, saves with a new name and deletes the uploaded original. It used to work fine. Now it errors out saying;

      "ColdFusion could not delete the file C:/inetpub/wwwroot/chamberocity/PlantCity/PropertyListings/PLpics/87img/e.JPG for an unknown reason. ""

      Which it really really means is the permission to delete (that soon) has been revoked. If I wait 10 or 20 seconds (I have not timed it) I can delete the source file manually, If I try right away it tells me no - Even ON the server it tells me its in use.

      This code worked fine from September 08 until this morning (1/26/09).
      What gives?

      I even tried removing the delete call and resizing the uploaded file with the SAME name, but that actually breaks it worse, when I do that the file disappears completely.
      --The files go into a folder to populate an ajax image viewer. the user has complete control and the viewer shows all images in the folder, which is why I need to be able to resize and have ONE version of that image when the process completes. I do not want to have to write some extra page to delete files 'later' because of some new bug ( or what ever it is.

      Server is Windows 2003 Server, IIS6, CF8
      Thanks for any insight.