== How to fix it in Formidable

=== Code examples

==== Noncompliant code example

[source,javascript,diff-id=1,diff-type=noncompliant]
----
const Formidable = require('formidable');

const form          = new Formidable(); // Noncompliant
form.uploadDir      = "/tmp/";
form.keepExtensions = true;
----

==== Compliant solution

[source,javascript,diff-id=1,diff-type=compliant]
----
const Formidable = require('formidable');

const form          = new Formidable();
form.uploadDir      = "/uploads/";
form.keepExtensions = false;
----

=== How does this work?

include::../../common/fix/allowed-folder.adoc[]
