Are you using Windows/IIS? I've heard reports of uploaded files
staying locked with Windows/IIS for some time after the upload
completes...

On Wed, Sep 16, 2009 at 3:09 AM, salvatore fusto <[email protected]> wrote:
>
> the error  message is:
> Oops!
> Message         ColdFusion could not delete the file C:\ColdFusion8\wwwroot
> \newArtea\assets\images\cataloghi\alessia\hires.jpg for an unknown
> reason.
>
> my upload method:
>        <cffunction name="saveImg"
>                                access="public"
>                                output="false"
>                                returntype="ModelGlue.Core.Event">
>                <cfargument name="event" type="ModelGlue.Core.Event"
> required="true" />
>                        <cfset var slidingpath = 
> beans.settingMgr.getCataloghi() &
> arguments.event.getValue("modelloImg")>
>                        <cfif len(trim(arguments.event.getValue('newImg')))>
>                                <cffile action="upload" 
> destination="#expandPath(slidingPath)#"
> nameconflict="overwrite" filefield="newImg" result="upResult"
> attributes="normal">
>                        </cfif>
>                        <cfset 
> arguments.event.setvalue("slide",arguments.event.getValue
> ("modelloImg"))>
>                        <cfreturn arguments.event />
>        </cffunction>
>
> my delete method (without cftry block):
>        <cffunction name="cancellaImg"
>                                access="public"
>                                output="false"
>                                returntype="ModelGlue.Core.Event">
>                <cfargument name="event" type="ModelGlue.Core.Event"
> required="true" />
>                        <cfset var modello = 
> arguments.event.getValue("modello")>
>                        <cfset var img = arguments.event.getValue("img")>
>                        <cfset var img2delete = 
> beans.settingMgr.getCataloghi() & modello &
> "/" & img>
>                        <cffile action="delete" 
> file="#expandPath(img2delete)#">
>                        <cfset arguments.event.setValue("slide",modello)>
>                        <cfreturn arguments.event />
>        </cffunction>
>
> thanks and regards
> salvatore

--~--~---------~--~----~------------~-------~--~----~
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to