blueimp/jQuery-File-Upload — pull request #2715 by michaldudek (2013-11-03 23:20:56+00:00)
Title: Allow "options.acceptFileTypes" to be a string

Hi,

I'm implementing the uploader in my AngularJS app and came into tiny problem where I define all the uploader's options in the template:

```html

....

```

Obviously, the ```acceptFileTypes``` option defined like this is not a valid ```RegExp``` object - Angular actually throws an error:

```
Error: [$parse:lexerr] Lexer Error: Unexpected next character at columns 313-313 [\] in expression [{
'method' : 'put',
'url' : '/user/avatar/',
'autoUpload' : true,
'maxFileSize' : 5242880,
'acceptFileTypes' : /(\.|\/)(gif|jpe?g|png)$/i
}].
```

I know that I could define the options hash in the controller (like the demo does), but I wanted to keep the controller as small as possible.

Therefore I've made a tiny tweak that allows the ```acceptFileTypes``` option to be a string that will get converted into ```RegExp``` object (if it's not empty), so then I can use it like:

```html

....

```