Kaya 0.5.2 reference for WebCommon::allowFileUploads

List of functions and data types in WebCommon

Void allowFileUploads()

Usage

This function must be called from a webapp or CGI program's webconfig function to have any effect. It enables handling of user-uploaded files. If it is not called, HTTP POSTs with a content type of "multipart/form-data" (the type required for file uploads) will be treated as an unrecognised POST content type, and the POST data will be ignored.

This is a security feature to avoid all webapps needing to use setKayaUploadDir even if they never need to handle files. If you do need file upload support and so use this function, you must also set a temporary upload directory.

Related

kaya@kayalang.org | Last modified 29 November 2011 | Supported by Durham CompSoc | Powered by Kaya