How might I have Webforms save files to private file system or as a database blob? In Drupal 7, I have the file system configured as 



In the code for the Webforms' file component located at sites/all/modules/webform/components/file.inc, it appears that one could easily change it so that Webform file uploads are moved to the private file system by changing 'scheme' =&gt; 'public' to 'scheme' =&gt; 'private'. But I also know the pitfalls of hacking (changing) anything that could easily be overwritten with drush upc. 

 /**
 * Implements _webform_defaults_component().
 */
function _webform_defaults_file() {
  return array(
    'name' =&gt; '',
    'form_key' =&gt; NULL,
    'required' =&gt; 0,
    'pid' =&gt; 0,
    'weight' =&gt; 0,
    'extra' =&gt; array(
      'filtering' =&gt; array(
        'types' =&gt; array('gif', 'jpg', 'png'),
        'addextensions' =&gt; '',
        'size' =&gt; '2 MB',
      ),
      'scheme' =&gt; 'public',
      'directory' =&gt; '',
      'progress_indicator' =&gt; 'throbber',
      'title_display' =&gt; 0,
      'description' =&gt; '',
      'attributes' =&gt; array(),
      'private' =&gt; FALSE,
      'analysis' =&gt; FALSE,
    ),
  );
}


Given that all file uploads are stored referenced in the file_managed table

mysql&gt; describe file_managed;
+-----------+---------------------+------+-----+---------+----------------+
| Field     | Type                | Null | Key | Default | Extra          |
+-----------+---------------------+------+-----+---------+----------------+
| fid       | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| uid       | int(10) unsigned    | NO   | MUL | 0       |                |
| filename  | varchar(255)        | NO   |     |         |                |
| uri       | varchar(255)        | NO   | UNI |         |                |
| filemime  | varchar(255)        | NO   |     |         |                |
| filesize  | bigint(20) unsigned | NO   |     | 0       |                |
| status    | tinyint(4)          | NO   | MUL | 0       |                |
| timestamp | int(10) unsigned    | NO   | MUL | 0       |                |
+-----------+---------------------+------+-----+---------+----------------+


Is it feasible to do a post operation to a file upload that manually moves a file from public:// to private:// and updates the database entry? Would hook_file_presave or hook_file_insert be good tools to accomplish this?

Update

Based on the suggestion of using hook_webform_component_info_alter(), I implemented the following

/**
 * Implements hook_webform_component_info_alter().
 */
function  MYMOD_webform_component_info_alter(&amp;$components) {
   $components['file']['extra']['scheme'] = 'private';
   dsm($components['file']);
}


/**
 * Implements hook_file_insert().
 */
function MYMOD_file_insert($file) {
  dsm($file);
}


After the output of the DSM() shows the component array seems to be altered but the DSM from hook_file_insert() still shows that the file was deposited into the public area:
Did a little digging into Webform. There is a setting for this in webform I believe. There was an issue posted in the webform issues but it has been resolved. Saving file submission to private directory 

OP already solved but for future onlookers: There are instructions I believe on how to accomplish this in the comments of the issue referenced above, also make sure Webform is up-to-date.