title: Failed to load response data when updating data with file uploaded using laravel and inertiaJs
body: <p>I am building a SPA using Laravel 8 and inertiaJs</p>
  <p>I am trying to update records that have a uploaded <strong>file</strong> (input file).
  When storing data everything is good, but I have a problem when I try to <strong>update</strong> with file uploaded.</p>
  <p><strong>PS</strong>:
  There is no error showing in the console or from the server. In network tab I see the message &quot;Failed to load response&quot;, and like a result, the required fields show errors, it's like I sent an empty data.</p>
  <p>see image : <a href="https://i.stack.imgur.com/TpOAc.png" rel="nofollow noreferrer">Image showing the errors</a></p>
  <p>This is my code:</p>
  <p><strong>web.php</strong></p>
  <pre><code>Route::put('/software/{software}', [SoftwareController::class, 'update'])-&gt;name('software.update');
  </code></pre>
  <p><strong>SoftwareController</strong></p>
  <pre><code> public function update(Request $request, Software $software)
      {
          $data = $request-&gt;validate([
              'name' =&gt; 'required',
              'software_version' =&gt; 'nullable',
              'doc_ref' =&gt; 'nullable',
              'doc_version' =&gt; 'nullable',
              'doc_name' =&gt; 'required_with:doc_ref',
              'doc_filename' =&gt; 'nullable|file|mimes:docx,doc,xlsx,xls,pdf,jpg,png',
          ]);
  
  
          $doc_filename = $request-&gt;file('doc_filename') ? $request-&gt;file('doc_filename')-&gt;store('software/equipment', 'public') : null;
         
          $software-&gt;update(array_merge($data, ['doc_filename' =&gt; $doc_filename]));
  
          return Redirect::back()-&gt;with('success', 'Software updated.');
      }
  </code></pre>
  <p><strong>Edit.vue</strong></p>
  <pre><code> updateSoftware(){
          if (confirm(&quot;Do you want to update the software ?&quot;)) {
              this.$inertia.put(this.route('software.update',
                  {software : this.software_id}), this.form);
          } 
      },
  </code></pre>
  <p><strong>PS:</strong></p>
  <p><strong>this.form</strong> : contain the data related to v-model</p>
  <p><strong>this.software_id</strong> : contain the <strong>id</strong> of the current instance.</p>