I have a react app that has a file upload, I compress the image with compressorjs and append it to formdata. How can I limit the file upload to only accept the following mime types: image/jpg, image/jpeg, image/png, image/svg+xml, image/gif, image/webp
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.
Hello what'sup
Hello!  

The galaxy is what'sup (wink). 

However this question could have many answers that depend entirely on your personal existential perspective, a roof, clouds, airplanes or the vast infinite empty void of the cosmos could also be valid answers.

Personally I like revel in the grand nature of the universe, so that is what I consider my up.