This is a bit of a brain dump, but I was just having an interesting
conversation with Bob Silverberg recently about where we think file
uploads should occur in an OO application. Currently we are both
processing our file uploads by calling a Filesystem object (in my case
the uploadFile() method of the Utilities plugin) from the service
layer.
We concluded that the job of uploading files really belongs in the
controller, and as the controller is an extension of an MVC framework,
maybe the MVC framework could handle the file uploads.
We're thinking that it could work along the lines of the security
interceptor config to handle which handler and permissions are allowed
to upload files. A naming converntion could be used to name form
fields containing file uploads. The result of the upload could be
store in the event collection.
Do you think that this would be a good thing to have as a ColdBox
interceptor?
Bob has posted a more in-depth version to the Model Glue mailing list
which is an interesting read at
http://groups.google.co.uk/group/model-glue/browse_thread/thread/db6893bbe8a9050
Thanks for reading