File Uploads

If you want to do file uploads, look at the code that is responsible for adding a profile picture in ControllerPostActions::processformEditConsultantProfile

The same pattern for dealing with form data in the previous chapter holds. The only differences are that

In the above, the fdimagecontents variable contents the entire contents of an image file. writeFileForce is just a wrapper over writeFile that creates necessary parent directories if they are missing.