Repository: nautobot/nautobot

Issue:
FileVar job variable causes Server Error
<!--
    NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.

    This form is only for reporting reproducible bugs. If you need assistance
    with Nautobot installation, or if you have a general question, please start a
    discussion instead: https://github.com/nautobot/nautobot/discussions

    Please describe the environment in which you are running Nautobot. Be sure
    that you are running an unmodified instance of the latest stable release
    before submitting a bug report, and that any plugins have been disabled.
-->
### Environment
* Python version: 3.8.12
* Nautobot version: 1.1.3

<!--
    Describe in detail the exact steps that someone else can take to reproduce
    this bug using the current stable release of Nautobot. Begin with the
    creation of any necessary database objects and call out every operation
    being performed explicitly. If reporting a bug in the REST API, be sure to
    reconstruct the raw HTTP request(s) being made: Don't rely on a client
    library such as pynautobot.
-->
### Steps to Reproduce
1. Create a custom `MyCustomJob` job script which has a `nautobot.extras.jobs.FileVar` variable.
2. Navigate to **Extensibility - Jobs - MyCustomJob**
3.

<!-- What did you expect to happen? -->
### Expected Behavior
Job Data table including a file input form field to select a file as input for the script.

<!-- What happened instead? -->
### Observed Behavior
![Screenshot 2021-10-08 at 11 36 33](https://user-images.githubusercontent.com/23073233/136570345-fd154ab7-a3db-4b07-a78b-d2be33a4c2af.png)


### Workaround

```
# nautobot_config.py
EXTRA_INSTALLED_APPS = ["db_file_storage"]
```




Discussion:

Resolving patch:
diff --git a/nautobot/core/settings.py b/nautobot/core/settings.py
--- a/nautobot/core/settings.py
+++ b/nautobot/core/settings.py
@@ -304,6 +304,7 @@
     "health_check",
     "health_check.cache",
     "health_check.storage",
+    "db_file_storage",
 ]
 
 # Middleware


Test patch:
diff --git a/nautobot/extras/tests/dummy_jobs/test_field_order.py b/nautobot/extras/tests/dummy_jobs/test_field_order.py
--- a/nautobot/extras/tests/dummy_jobs/test_field_order.py
+++ b/nautobot/extras/tests/dummy_jobs/test_field_order.py
@@ -1,4 +1,4 @@
-from nautobot.extras.jobs import Job, StringVar
+from nautobot.extras.jobs import Job, FileVar, StringVar
 
 
 class TestFieldOrder(Job):
@@ -8,7 +8,9 @@ class TestFieldOrder(Job):
 
     var2 = StringVar(description="Hello")
 
+    var1 = FileVar(description="Some file wants to be first")
+
     class Meta:
         """Metaclass attrs."""
 
-        field_order = ["var2", "var23"]
+        field_order = ["var1", "var2", "var23"]
diff --git a/nautobot/extras/tests/test_jobs.py b/nautobot/extras/tests/test_jobs.py
--- a/nautobot/extras/tests/test_jobs.py
+++ b/nautobot/extras/tests/test_jobs.py
@@ -83,7 +83,10 @@ def test_field_order(self):
 
             self.assertHTMLEqual(
                 form.as_table(),
-                """<tr><th><label for="id_var2">Var2:</label></th><td>
+                """<tr><th><label for="id_var1">Var1:</label></th><td>
+<input class="form-control form-control" id="id_var1" name="var1" placeholder="None" required type="file">
+<br><span class="helptext">Some file wants to be first</span></td></tr>
+<tr><th><label for="id_var2">Var2:</label></th><td>
 <input class="form-control form-control" id="id_var2" name="var2" placeholder="None" required type="text">
 <br><span class="helptext">Hello</span></td></tr>
 <tr><th><label for="id_var23">Var23:</label></th><td>