Why is the file not showing up in request.files and in request.forms instead?

I'm am trying to send a file from React to flask, but when I send it, it doesn't come up in request.files where it's supposed to be, and instead in request.form. How do I fix this?

here is react code:

  const data = new FormData();
    data.append("file", file);
    await fetch("/run", {
      method: "POST",
      body: data
    }).then(res => res.json())
    .then(data => console.log(data.file))
    .catch(error => console.error(error))

here is the flask code:

@app.route('/run', methods=['GET', 'POST'])
def upload_file():
    if request.method == 'POST':
        if 'file' not in request.files:
            flash('No file part')
            return {'file': "no file part"}
        file = request.files['file']
        if file.filename == '':
            flash('No selected file')
            return {'file': 'no selected file'}
        if file and allowed_file(file.filename):
            filename = secure_filename(file.filename)
            file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
            return redirect(url_for('uploaded_file',

        return {"file": "this a get"}