error TS2339: Property '_input' does not exist on type

%3CLINGO-SUB%20id%3D%22lingo-sub-1495015%22%20slang%3D%22en-US%22%3Eerror%20TS2339%3A%20Property%20'_input'%20does%20not%20exist%20on%20type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1495015%22%20slang%3D%22en-US%22%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3EAn%20advice%20on%20how%20to%20fix%20these%20errors%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eerror%20TS2339%3A%20Property%20'_input'%20does%20not%20exist%20on%20type%20'FileUpload'.%3CBR%20%2F%3Eerror%20TS2339%3A%20Property%20'_input'%20does%20not%20exist%20on%20type%20'FileUpload'.%3CBR%20%2F%3Eerror%20TS2339%3A%20Property%20'context'%20does%20not%20exist%20on%20type%20'Readonly%26lt%3B%7B%20children%3F%3A%20ReactNode%3B%20%7D%26gt%3B%20%26amp%3B%20Readonly%3CIFILEUPLOADPROPS%3E%3C%2FIFILEUPLOADPROPS%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eexport%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Edefault%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eclass%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EFileUpload%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eextends%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EReact%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3EComponent%3C%2FSPAN%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3C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p%3B%26nbsp%3B%26nbsp%3B%7D)%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1495015%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor
An advice on how to fix these errors
 
error TS2339: Property '_input' does not exist on type 'FileUpload'.
error TS2339: Property '_input' does not exist on type 'FileUpload'.
error TS2339: Property 'context' does not exist on type 'Readonly<{ children?: ReactNode; }> & Readonly<IFileUploadProps>
 
export default class FileUpload extends React.Component<IFileUploadProps, {}> {
  public render(): React.ReactElement<IFileUploadProps> {
    return (
      <div className={styles.fileUpload}>
        <div className={styles.container}>
          <div className={styles.row}>
            <div className={styles.column}>
              <span className={styles.title}>SharePoint!</span>
              <p className={styles.subTitle}> Web Parts.</p>
              <p className={styles.description}>{escape(this.props.description)}</p>
              <a href="https://aka.ms/spfx" className={styles.button}>
                <span className={styles.label}>Learn more</span>
              </a>
              <input
                type="file"
                ref={(elm=> {
                  this._input = elm;
                }}
              />
              <p>
                <button onClick={() => this.uploadFileFromControl()}>Upload</button>
              </p>
            </div>
          </div>
        </div>
      </div>
    );
  }
  private uploadFileFromControl() {
    //Get the file from File DOM
    var files = this._input.files;
    var file = files[0];
    //Upload a file to the SharePoint Library
    sp.web
      .getFolderByServerRelativeUrl(this.props.context.pageContext.web.serverRelativeUrl + '/OrderLibrary')
      .files.add(file.namefiletrue)
      .then((data=> {
        alert('File uploaded sucessfully');
      })
      .catch((error=> {
        alert('Error is uploading');
      });
  }
}
0 Replies