More configurable upload widget

- Allow it to be embedded without a modal dialog
- Add hooks for file selection and pre-upload