title: How can I retrieve a SharePoint list items attachments using spfx?
body: <p>I've managed to figure out how to submit multiple attachments to a sharepoint list item.
  I now need to retrieve the item and display these items in the same form that was submitted.</p>
  
  <p>Here's the submit code:</p>
  
  <pre><code>private _onSubmit() {
      this.setState({
        FormStatus: 'Submitted',
        SubmittedLblVis: true,
  
      }, () =&gt; {
  
        pnp.sp.web.lists.getByTitle("My List").items.add({
  
          State: this.state.State,
          State1: this.state.State1,
  
        }).then((iar: ItemAddResult) =&gt; {
          var attachments: AttachmentFileInfo[] = [];
  
          attachments.push({
            name: this.state.FileUpload[0].name,
            content: this.state.FileUpload[0]
  
          });
  
          attachments.push({
            name: this.state.FileUpload2[0].name,
            content: this.state.FileUpload2[0]
          });
  
          attachments.push({
            name: this.state.FileUpload3[0].name,
            content: this.state.FileUpload3[0]
          });
  
      iar.item.attachmentFiles.addMultiple(attachments);
  
  </code></pre>
  
  <p>This works great.</p>
  
  <p>I have a button the form that allows the user to read an item and populate all the fields in the form. This works fine. But it's not working for the attachments. First thing is I don't know what the Attachments column is called!</p>
  
  <p>Here's the retrieval function:</p>
  
  <pre><code>private _editItem = (ev: React.MouseEvent&lt;HTMLElement&gt;) =&gt; {
      const sid = Number(ev.currentTarget.id);
      let _item = this.state.Items.filter((item) =&gt; { return item.Id === sid; });
      if (_item &amp;&amp; _item.length &gt; 0) {
        this._getListItems();
        this.setState({
          State etc...with a few examples
  
          FormStatus: _item[0].FormStatus, 
  
          showModal: true
  
          //The below callback function 
        }, () =&gt; {
  
          if (_item[0].PanelMember) {
            this.PanelMemberGetPeoplePicker(Number(_item[0].PanelMemberId));
          }
  
        });
      }
    }
  
  </code></pre>
  
  <p>And the _getListItems() function within the above:</p>
  
  <pre><code> public _getListItems() {
      sp.web.lists.getByTitle("MyList").items.get().then((items: any[]) =&gt; {
        let returnedItems: MyDataModel[] = items.map((item) =&gt; { return new MyDataModel(item); });
  
        this.setState({ Items: returnedItems });
      });
    }
  
  </code></pre>
  
  <p>I understand that I'll have to update the MyDataModel interface with whatever the attachment column is but what is the attachment column? And how would I implement it within the above to retrieve all 3 attached documents?</p>