enyo/dropzone — pull request #742 by jmcarp (2014-11-02 17:19:22+00:00)
Title: 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.

This patch came out of the development of [hgrid.js](https://github.com/centerforopenscience/hgrid), a hierarchical data browser that uses Dropzone for uploads to different directories. HGrid stores upload destination information on the file objects, so we had to monkey-patch Dropzone to allow it to use a function to build upload URLs and methods on a per-file basis. This patch would give users of Dropzone more control over how upload URLs and methods are built, but without complicating the API for developers who don't need that flexibility, since either a string or a function can be provided for `Dropzone.options.url` and `Dropzone.options.method`.