Does react-papaparse support accepting/rejecting file types

Viewed 318

I'm using react-papaparse to upload local .csv files. On a Mac, only .csv files are enabled. On a Windows all file types are available. Is there a way to only allow .csv file types across all operating systems? I didn't see this as a config option in the docs.

Here is my implementation

              <CSVReader
                ref={this.buttonRef}
                onFileLoad={this.onFileLoad}
                onError={this.handleFileUploadError}
                noDrag
              >
                {({ file }) => (
                  <span>
                   {file && file.name}
                  </span>
                )}
              </CSVReader>
0 Answers
Related