You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thofrey edited this page Jul 23, 2013
·
2 revisions
This inevitably happens to all newcomers to Mach-II. As you know, the event object in Mach-II contains all the input parameters from the URL and the Form scopes. When you use the getArg() function, you are actually dipping into the accumulated values. This provides a nice abstraction for those parameters because we don't care whether the parameter came in via post or get, we just need to access the value. Also, there are some handy offerings such as setting a default value, testing for the existence of a parameter, etc.
This is all well and good until you need to upload a file. The file upload routine in ColdFusion requires the actual name of the form field, not a reference to the contents. Thus, use the actual name, not the arguments.event.getArg() syntax.
If your problem is not fixed by using the explicit name of the form field, you may want to check your form tag for the proper enctype attribute. enctype="multipart/form-data"