To limit the file upload to accept only specific MIME types in your React app, you can use the accept attribute of the input element in your file upload form. Here's an example of how you can set the accept attribute to allow only the MIME types you mentioned:

<input
  type="file"
  accept=".jpg, .jpeg, .png, .svg, .gif, .webp"
  onChange={handleFileUpload}
/>

In this example, the accept attribute is set to a comma-separated list of file extensions that correspond to the allowed MIME types. You can use the . (dot) character to specify file extensions, which will be translated to the corresponding MIME types by the browser.

Note that the accept attribute is not a security feature and can be bypassed by malicious users, so you should always validate the MIME type of the uploaded file on the server-side as well. You can use a library like file-type or mime-types to do this validation in Node.js.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence