How to add file upload to plugin settings page?

I’am creating plugin with simple import data from csv file. I create import page with add_submenu_page and include html form. Form contain input with file select. In admin_init action I define this variable with register_setting( 'group', 'field_name' ). When I save settings, I use action pre_update_option_{field_name}. Without defining I can’t use this action. Everything works fine, but this option save in wp_options, but I don’t want to store this option, I only want to process file. Is it better solution or there is another way to do that?

Read more here: How to add file upload to plugin settings page?

Leave a Reply

Your email address will not be published. Required fields are marked *