Upload

We've created two special components to make it easier for you to create a picture/image upload on your form.

Styles

You will find the styles for these components in
assets/scss/nextjs-material-kit-pro/_fileupload.scss.

ImageUpload

This component was made to look like jasny's image uploads with a preview image after the user selects an image, a button for changing the image and one for removing it.

If you want to submit the image (to save it on your server after it has been uploaded) you have to change the handleSubmit function in components/CustomUpload/ImageUpload.js at line 35.

...
...
import React from 'react';
// core components
import ImageUpload from 'components/CustomUpload/ImageUpload.js';

export default function Upload(){
  return (
    <div>
      <ImageUpload />
      <ImageUpload avatar/>
    </div>
  );
}