Component Upload reports 'Incorrect File Type'

  1. Please refer to the example at [https://vaadin.com/components/vaadin-upload/java-examples]
    (http://) .
  2. Change MIME type to “text/csv” as the following:
  MemoryBuffer  buffer = new MemoryBuffer ();
  Upload upload = new Upload(buffer);
  upload.setAcceptedFileTypes("text/csv");
  1. Upload a CSV file, then Component reports an error message ‘Incorrect File Type’.

Is there anything missed in the code above?