diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-26 11:42:48 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-26 11:42:48 +0200 |
commit | 5792b3d3580b9f09460305858293398d8d8a9abf (patch) | |
tree | 90d60e9db4ed733a60c2890c7305d45ddd48be42 /addon/js_upload/file-uploader/server/coldfusion/coldfusion.cfc | |
parent | 991656a3ef396d9a6bd43ddb752627c2880b17ba (diff) | |
parent | 428e6766411d2c6708ad25f726c4bcf1d64af1cc (diff) | |
download | volse-hubzilla-5792b3d3580b9f09460305858293398d8d8a9abf.tar.gz volse-hubzilla-5792b3d3580b9f09460305858293398d8d8a9abf.tar.bz2 volse-hubzilla-5792b3d3580b9f09460305858293398d8d8a9abf.zip |
Merge branch 'master' into newui
Diffstat (limited to 'addon/js_upload/file-uploader/server/coldfusion/coldfusion.cfc')
-rw-r--r-- | addon/js_upload/file-uploader/server/coldfusion/coldfusion.cfc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/addon/js_upload/file-uploader/server/coldfusion/coldfusion.cfc b/addon/js_upload/file-uploader/server/coldfusion/coldfusion.cfc deleted file mode 100644 index 4e07270d1..000000000 --- a/addon/js_upload/file-uploader/server/coldfusion/coldfusion.cfc +++ /dev/null @@ -1 +0,0 @@ -<!---
AJAX FileUploader for ColdFusion
version: 1.1.1
feedback: sid.maestre@designovermatter.com
-----------update history----------------
1.1.1 on 9/30/2010 by Martin Webb <martin[at]cubicstate.com>
- Change function for Upload to returnformat equals JSON
- local var scoping.
1.1 on 9/9/2010 by Sid Maestre
- Split Upload function to handle fallback uploads for browsers that don't support XHR data transfer
--->
<cfcomponent hint="I handle AJAX File Uploads from Valum's AJAX file uploader library">
<cffunction name="Upload" access="remote" output="false" returntype="any" returnformat="JSON">
<cfargument name="qqfile" type="string" required="true">
<cfset var local = structNew()>
<cfset local.response = structNew()>
<cfset local.requestData = GetHttpRequestData()>
<!--- check if XHR data exists --->
<cfif len(local.requestData.content) GT 0>
<cfset local.response = UploadFileXhr(arguments.qqfile, local.requestData.content)>
<cfelse>
<!--- no XHR data process as standard form submission --->
<cffile action="upload" fileField="arguments.qqfile" destination="#ExpandPath('.')#" nameConflict="makeunique">
<cfset local.response['success'] = true>
<cfset local.response['type'] = 'form'>
</cfif>
<cfreturn local.response>
</cffunction>
<cffunction name="UploadFileXhr" access="private" output="false" returntype="struct">
<cfargument name="qqfile" type="string" required="true">
<cfargument name="content" type="any" required="true">
<cfset var local = structNew()>
<cfset local.response = structNew()>
<!--- write the contents of the http request to a file.
The filename is passed with the qqfile variable --->
<cffile action="write" file="#ExpandPath('.')#/#arguments.qqfile#" output="#arguments.content#">
<!--- if you want to return some JSON you can do it here.
I'm just passing a success message --->
<cfset local.response['success'] = true>
<cfset local.response['type'] = 'xhr'>
<cfreturn local.response>
</cffunction>
</cfcomponent>
\ No newline at end of file |