Component Upload reports 'Incorrect File Type'

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

Is there anything missed in the code above?