title: getting "params.Body is required" error when trying to upload to s3
body: <p>I'm trying to upload a file to aws. But when I try I get the error  "params.Body is required". I hae never had this error before and I dont know how to go about handling it. You can find the relevant code below.</p>
  
  <p>state:</p>
  
  <pre><code>const initialState = {
     arzt:"",
     patient: "",
     record: "",
     image: "",
     audio: "",
   };
  
  
  class EintraegePatient extends Component {
   state = {
     ...initialState
   };
  </code></pre>
  
  <p>handleAddrecord:</p>
  
  <pre><code>handleAddRecord = async () =&gt; {
     try{
      const visibility = "public";
      const {identityId} = await Auth.currentCredentials()
      const filename = `/${visibility}/${identityId}/${Date.now()}-${this.state.image.name}`
  
      const uploadedFile = await Storage.put(filename, this.state.image.file, {
        contentType: this.state.image.type
      })
      const file = {
        key: uploadedFile.key,
        bucket: aws_exports.aws_user_files_s3_bucket,
        region: aws_exports.aws_project_region
      }
      const input = {
  
       record: this.state.record,
        file
      }
      const result = await API.graphql(graphqlOperation(createRecords, {input}))
      console.log( "success", result )
      Notification({
        title: "Success",
        message: "Record successfully created!",
        type: "success"
      })
      this.setState({ ...initialState })
    } catch(err) {
      console.error('Error adding Record', err)
    }
    }
  </code></pre>
  
  <p>then the part of the render that matters</p>
  
  <pre><code>&lt;TextField
           id="outlined-eintreag-input"
           label="eintrag"
           placeholder="Neuer Eintrag"
           margin="normal"
           variant="outlined"
           onChange={record =&gt; this.setState({ record })}
         /&gt;
         &lt;Button
         variant="contained"
         color="primary"
         className={classes.button}
         onClick={this.handleAddRecord}
         &gt;
         Senden &lt;SendIcon color="secondary" style={{ margin: 8 }}/&gt;
        &lt;/Button&gt;
  
  
       &lt;PhotoPicker
         title="Product Image"
         id="contained-button-file"
         preview="hidden"
         onPick={file =&gt; this.setState({ image : file })}
         onLoad={url =&gt; this.setState({ imagePreview: url })}
  </code></pre>
  
  <p>Any help is much appreciated. Thanks!</p>