2

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>
Adam Bradbury
  • 91
  • 2
  • 11
  • if the component you're using does not support it, I guess you could check the file you're loading, and check for the file type. – Christian Moen Oct 28 '20 at 18:07

0 Answers0