Upload a custom csv file, read contents and delete that file

  1. Enable upload of CSV files, which are not in the default allowed files (see here)
  2. Hook into add_attachment action hook to detect when the desired file is uploaded
  3. Do whatever you need to do using that hook, then trigger wp_delete_attachment once the file has been processed.

Depending on what you want to do, it may be beneficial to craft your own upload setup outside the default Media Manager where it would be easier to detect when a file uploaded should be processed by your plugin.