>- see footer for list info -< Hi Matt and Duncan,
Thanks both for your help. Sorted the problem. Instead of trying to maintain anything like the filename uploaded I've just renemaed it to the users ID. I'm unclear on cflock .... ? Jenny http://www.chicksnchaps.co.uk <!-- check file name has been entered --> <cfif NOT Len(form.file)> <cflocation url="change_add_pic.cfm"> </cfif> <!-- get user details --> <cfquery name="Register" datasource="dating"> SELECT * FROM dbo.Registered WHERE dbo.Registered.RegisterID = #session.registerID# </cfquery> <!-- get the new photo --> <cfoutput> <cffile accept="image/jpeg, image/jpg, image/pjpeg, image/gif" action="upload" attributes="normal" destination="C:\Apache2\htdocs\profiles\photos\" filefield="form.file" nameconflict="makeunique"> </cfoutput> <cffile action="rename" destination="#cffile.ServerDirectory#\#register.registerid#.#serverfileext#" source="#cffile.ServerDirectory#\#cffile.serverfileName#.#cffile.serverfileE xt#"></cffile> <cfset filename = "#register.registerid#.#serverfileext#"> <cfset thumbname = "thumb_#register.registerid#.#serverfileext#"> <cfquery datasource="dating"> UPDATE Registered SET Photo = '#filename#', PhotoThumb ='#thumbname#' WHERE Registered.RegisterID = #session.registerID# </cfquery> <!-- create new thumbs --> <cfexecute name = "c:\Program Files\ImageMagick-6.0.1-Q16\convert.exe" arguments = "-sample 200x200 \apache2\htdocs\profiles\photos\#filename# \apache2\htdocs\profiles\photos\thumbs\#thumbname#"></cfexecute> <cfexecute name = "c:\Program Files\ImageMagick-6.0.1-Q16\convert.exe" arguments = "-sample 125x125 \apache2\htdocs\profiles\photos\#filename# \apache2\htdocs\profiles\photos\thumbs\small\#thumbname#"></cfexecute> <!-- set profile for admin review and return to View Profile --> <cflocation url="profile_updated.cfm"> _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
