English 中文(简体)
• 如何进入冷聚物中单壳载荷制造的物体
原标题:How to access the object created by a cffile upload in coldfusion

我的问题很紧张,但我将集中谈谈这里的问题。 我如何从单壳上载取物体。 我目前正在这样做。

<cffile action="upload" destination="#Application.filePath#Pics/" filefield="image1" nameconflict="makeunique">
<cfif isDefined ("cffile.serverFile")>
<cfset image1Place = #cffile.serverFile#> 
</cfif>

but that doesn t seem like it would work well with multiple file uploads, which happens to be my case.

最佳回答

如果你再次担心,由于多处假肢而被击退,那么你可以使用“结果”的特性加以区别:

<cfset uploadResults = {}>
<cfloop list="#form.filelist#" index="myFile">
  <cffile action="upload" destination="#Application.filePath#Pics/"
    filefield="#myFile#" nameconflict="makeunique" 
    result= uploadResults.#myFile# >

  <cfif StructKeyExists(uploadResults, myFile)>
    <cfset image1Place = uploadResults[myFile].serverFile> 
  </cfif>
</cfloop>
问题回答

暂无回答




相关问题
JQuery AJAX .load - flash chart doesnt load in IE

An IE issue has me completely stumped. I have a coldfusion page that uses JQuery s AJAX .load function to load in a new flash file that is generated by coldFusion s cfchart tag. This works completely ...

Best Coldfusion Library for OpenID [closed]

I am getting ready to start a project that requires using OpenID within Coldfusion 8. I have found a number of different options and was wondering what has worked the best, get s the most support, ...

Find ColdFusion Generated ID

Is there a way to find the elements generated by ColdFusion s <CFLayout> and <CFLayoutArea> tags? These tags: <cflayout type="tab" name="MyAccount"> <cflayoutarea name="...

ColdFusion COM error

I am upgrading from CF4.5 to CF8. Calls to COM dll s that used to work in version 4.5 now throw a "Complex object types cannot be converted to simple values.." error. The COM object has a few arrays ...

What s the best way to write engine-specific CFML code?

Sometimes it is necessary to write different code for Adobe ColdFusion vs Railo vs OpenBD, due to differences in implementation. Do people have a specific method that they use for this? For example, ...

热门标签