You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added an "allowedOptions" key to the s3UploadOptions object to contain an array of acceptable MIME types. Then, I added the following to the directive at line 62.
if (opts.allowedTypes) {
if (opts.allowedTypes.indexOf(selectedFile.type) === -1) {
throw Error("Invalid MIME type");
}
}
This works for me. I'd be happy to put it in a pull request...
Hi, looks good.
Please send a pull request. also please note that currently your code doesn't handle a case where the file's MIME type couldn't be determined. (file.type would return an empty string in that case).
you can convert it into application/octet-stream before performing your test.
Another attribute could be "accept" to limit file types.
The text was updated successfully, but these errors were encountered: