• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Issues with CFFILE and CFIMAGE together

Participant ,
Jan 26, 2009 Jan 26, 2009

Copy link to clipboard

Copied

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"
destination="#path#/PropertyListings/PLpics/#URL.ID#img"
nameconflict="Overwrite"
mode="777"
attributes="normal"
filefield="p2">
<!---Resize input image--->
<cfimage action="convert"
source="#path#/PropertyListings/PLpics/#URL.ID#img/#File.serverFile#"
destination="#path#/PropertyListings/PLpics/#URL.ID#img/#URL.ID#-#File.serverFile#"
width="300"
height=""
structname="picInfo">
<cffile action="delete" file="#path#/PropertyListings/PLpics/#URL.ID#img/#File.serverFile#">
</cfif>

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.
TOPICS
Advanced techniques

Views

439

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jan 26, 2009 Jan 26, 2009

Copy link to clipboard

Copied

Did you check the latest patches? There was one to fix an issue with files being locked after using image functions:
http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403411&sliceId=1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 26, 2009 Jan 26, 2009

Copy link to clipboard

Copied

LATEST
YES!! Thanks so much, that fixed it. We are VPS Hosted, and told that all patches were always up to date, this was missed, but I took care of it thanks to your keen eye
Much Appreciated!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation