|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
I have a file where we are allowing images to be uploaded. I wrote the following code to get this accomplish....
<cfset Request.UploadDirectory = GetDirectoryFromPath(GetCurrentTemplatePath()) & "images/" /> <!--- here i Get the extension of the uploaded file. ---> <cfset Request.FileExt = ListLast(Request.SystemFileName, ".") /> <!--- Now I Upload the file. ---> <cffile action="upload" destination="#Request.UploadDirectory#event_#Request.EventID#.# Request.FileExt#" filefield="ImageFile" nameconflict="overwrite" /> <!--- I Update the event with the name of the file. ---> <cfquery datasource="#application.datasource#"> UPDATE Event SET EventImage = 'event_#Request.EventID#.#Request.FileExt#' WHERE EventID = #Request.EventID# </cfquery> My problem is the following...we use webfileUtils to do our web uploads using asp. there is a certain way to upload it. How can I incorporate this into my code? this is the asp code i got. <beginning of asp code> if action = "upload" then pth = server.mappath("..") & "\images" Response.Write "server.mappath = " & pth & "<br>" Response.End Set ObjWebUpload = Server.CreateObject("WebFileUtils.WebUpload") filename = ObjWebUpload.DoUpload(cstr(pth)) SQL = "insert into volunteer_pics(filename,caption) values ('"&filename&"','"&caption&"')" set rst = cons.execute(SQL) set rst = nothing response.redirect "volunteer_opp_pics_admin.asp?action=main&validateuser=ok&validatepwd=ok" End If <end of asp code> any help I can get on this will really help me..... |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Cold Fusion Development > image upload |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|