diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index f20acde69b7..47723a05cbc 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -75,7 +75,7 @@ class FormFile
global $conf,$langs, $hookmanager;
$hookmanager->initHooks(array('formfile'));
- if (! empty($conf->browser->layout) && $conf->browser->layout != 'classic') return 0;
+ if (! empty($conf->browser->layout) && $conf->browser->layout != 'classic') $useajax=0;
if ((! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) && $useajax) || ($useajax==2))
{