-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fileExtension + mimetypes check on JS side #17
Add fileExtension + mimetypes check on JS side #17
Conversation
Codecov Report
@@ Coverage Diff @@
## master #17 +/- ##
=======================================
Coverage 100% 100%
Complexity 13 13
=======================================
Files 7 7
Lines 33 33
=======================================
Hits 33 33 Continue to review full report at Codecov.
|
@@ -39,6 +39,8 @@ | |||
$('div.{{ form.vars.id }}').dmUploader({ | |||
url: '{{ form.vars.action }}', | |||
maxFileSize: 30000000000, | |||
extFilter: {{ provider.allowedExtensions|json_encode|raw }}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a default here, too if not set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried and it seems not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way we could get errors when the provider injected is not an instance of FileProvider. I'll add a check whether methods are defined.
Please note that the composer.json file needs to be updated before you tag a new version. 3.15 of the mediabundle is required. |
i will release first if the issue is fully done. |
This is a first fix of fileExtension checking issue raised in #16
Before merging this one, we need to get the sonata-project/SonataMediaBundle#1451 merged first.