title: Flask - Get the name of an uploaded file minus the file extension
body: <p>I have a form where I upload multiple files in multiple field</p>
  
  <p>For example:
  I have a field called PR1, another Pr2 and PR3,
  In each this fields I can upload(or not) multiple files, the upload side works just fine:</p>
  
  <pre><code>files = request.files
  for prodotti in files:
          print(prodotti)
          for f in request.files.getlist(prodotti):
              if prodotti == 'file_ordine':
                  os.makedirs(os.path.join(app.instance_path, 'file_ordini'), exist_ok=True)
                  f.save(os.path.join(app.instance_path, 'file_ordini', secure_filename(f.filename)))
                  print(f)
  </code></pre>
  
  <p>so with this method the result for example is:</p>
  
  <pre><code>Pr1
  &lt;FileStorage: 'FAIL #2.mp3' ('audio/mp3')&gt;
  </code></pre>
  
  <p>at this point I want to Update the field <code>file</code> in the row of <code>pr1</code> in my database with just the name of the <code>file</code> + the file extension, how can I get just the name of the file?</p>