Files
svc-api-x/v1/taffy/tests/resources/acceptFileUpload.cfc
T
2024-10-23 11:17:42 +03:00

17 lines
488 B
Plaintext

<cfcomponent extends="taffy.core.resource" taffy:uri="/upload">
<cffunction name="post">
<cfargument name="img" />
<cfset var local = structNew() />
<!--- accept the upload --->
<cffile action="upload" destination="#getTempDirectory()#" filefield="img" result="local.r" />
<!--- delete the file --->
<cffile action="delete" file="#local.r.serverdirectory#/#local.r.serverfile#" />
<cfreturn representationOf( local.r ).withStatus(200) />
</cffunction>
</cfcomponent>