Allow functions or strings for URL options.

Allow users to provide either a string or a function for the `method`
and `url` options. If a function is provided, call with `files` in
`uploadFiles`; else pass the string value. This can be useful when
different files need to be sent with different methods or URLs.