Checks if the input is a spreadsheet file or not
isSpreadsheetFile(value)
→ returns boolean
Here we have simple example to check if the given file is a spreadsheet or not.
<form method="post" enctype="multipart/form-data">
<input type="file" name="myfile" />
<input type="submit" name="submit" value="submit">
</form>
<cfif structKeyExists(form, "submit")>
<cfif isSpreadsheetFile(form.myfile)>
<cffile action="upload" destination="#getTempDirectory()#" filefield="form.myfile" nameconflict="makeunique">
</cfif>
</cfif>
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.