Sure, here are the steps on how to limit the file upload to only accept the following mime types: "image/jpg, image/jpeg, image/png, image/svg+xml, image/gif, image/webp" in a React app:

Import the FileReader and FormData modules from @types/react.
Create a function that will check the file type and return a boolean value.
Use the onchange event handler to call the function and check the file type.
If the file type is not in the list of allowed mime types, display an error message.
Otherwise, compress the image with compressorjs and append it to the FormData object.

Here is an example of how to do this:

```
import React, { useState } from "react";
import FileReader from "@types/react/lib/FileReader";
import FormData from "@types/react/lib/FormData";

const App = () => {
  const [file, setFile] = useState(null);
  const [error, setError] = useState(null);

  const handleChange = (e) => {
    const reader = new FileReader();
    reader.onload = () => {
      const fileType = reader.result.split(/\/|;/)[1];
      if (fileType === "image/jpg" || fileType === "image/jpeg" || fileType === "image/png" || fileType === "image/svg+xml" || fileType === "image/gif" || fileType === "image/webp") {
        setFile(reader.result);
      } else {
        setError("Invalid file type");
      }
    };
    reader.readAsDataURL(e.target.files[0]);
  };

  const handleSubmit = (e) => {
    e.preventDefault();
    const formData = new FormData();
    formData.append("file", file);
    // Send the form data to the server
  };

  return (
    <div>
      <input type="file" onChange={handleChange} />
      {error && <p>{error}</p>}
      <button onClick={handleSubmit}>Submit</button>
    </div>
  );
};

export default App;
```


This code will limit the file upload to only accept the following mime types: "image/jpg, image/jpeg, image/png, image/svg+xml, image/gif, image/webp". If the user tries to upload a file with a different mime type, an error message will be displayed.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence