as i am still on 5.3, i am getting a issue on uplo...
# lucee
g
as i am still on 5.3, i am getting a issue on upload <cfscript> isDefined("Form.photo") { filename = GetPageContext().formScope().getUploadResource("photo").getName(); renamed_filename = reReplace(filename, '[^a-zA-Z0-9\.]', '', 'all'); FileUpload( destination='#imagepath#/' & renamed_filename, fileField=photo, nameConflict="overwrite", mode="777" ); } </cfscript> the code above i used because i was getting malformed input error error now is: Missing [;] or [line feed] after expression i still don't get it why it is problematic
g
Would using an "if" with the isDefined() help?
Copy code
if( isDefined("Form.photo") ) {
...
}
g
Good catch