Hey,
I'm using cfcontent in a method that just delivers files. I pass in an argument
which is a filename. But my code just downloads a word doc as a cfm file, and
it names it index.cfm page. It won't download the requested file AS the file
and with the correct filename. I know I'm using unknown as a type but I need to
allow most filetypes. WOuld I need to setup another db table with all the
filetypes acceptable? Then pass that in as an argument too, so the type is
always correct?
<cffunction name="downloadFile" access="public" output="false">
<cfargument name="filename" required="yes" type="string">
<cfset fullpath = ExpandPath("UploadedFiles") & "\" & "#ARGUMENTS.filename#">
<cfcontent file="#fullpath#" type="unknown">
</cffunction>
Thanks,
Will
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232777
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54