Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Pôle IS
Bundles Symfony 2
file-upload-bundle
Commits
648ba6ef
Commit
648ba6ef
authored
May 23, 2016
by
Guillaume Perréal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Désactive la vérification du type MIME côté client.
Cela dépend trop de la configuration du navigateur.
parent
31bdc1b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
Form/Type/FileUploadType.php
Form/Type/FileUploadType.php
+3
-0
No files found.
Form/Type/FileUploadType.php
View file @
648ba6ef
...
...
@@ -97,6 +97,9 @@ class FileUploadType extends AbstractType
*/
public
function
buildView
(
FormView
$view
,
FormInterface
$form
,
array
$options
)
{
// Désactive la vérification du type MIME côté client, car elle n'est pas assez fiable.
unset
(
$options
[
'accept_file_types'
]);
$this
->
buildWidgetView
(
$view
,
$form
,
$options
);
$view
->
vars
[
'widget_attr'
][
'data-create-url'
]
=
$this
->
router
->
generate
(
'file_upload_create'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment