Uploading an image from a form in my custom module I am creating a custom module where the user uploads and image to the Drupal DB using a form.  All the data except for the file is being put into the DB though.  The only thing that shows in the 'image' field is "[BLOB - 0 B]"  The only instructions/tutorials that I can find are for uploading files to a directory, not a table in the db.

function new_floor_map_form($form, &amp;$form_state) {
    $form['new'] = array(
        '#type'     =&gt; 'markup',
        '#markup'   =&gt; '&lt;h2&gt;'.t('Start a new floor map:').'&lt;/h2&gt;',
    );
    $form['#attributes']['enctype'] = 'multipart/form-data';
    $form['file'] = array(
        '#type'     =&gt; 'file',
        '#title'        =&gt; t('Choose a file'),
    );
    $form ['name'] =array(
        '#type'     =&gt; 'textfield',
        '#title'        =&gt; t('Name:'),
    );
    $form['active'] = array(
        '#type'     =&gt; 'checkbox',
        '#title'        =&gt; t('Set as current floor map?'),
    );
    $form['submit'] = array(
        '#type'     =&gt; 'submit',
        '#value'    =&gt; t('Submit'),
    );

    return $form;
}
function new_floor_map_form_submit($form,&amp;$form_state) {
    if(isset($form['file']) &amp;&amp; (!empty($form['name']))){
        $insert = db_insert('floor_map_images')
            -&gt;fields(array (
            'image' =&gt; $form_state['values']['file'],
            'name'      =&gt; $form_state['values']['name'],
            'active'        =&gt; $form_state['values']['active'],
            ))
            -&gt;execute();
    }

 }
You shoud use Drupal file managing system. When Drupal is aware of a file, its data is stored in the file related tables. If you need to do something with a file you only need its identifier, called fid.

So, in your form upload the file using Drupal Form API, and store the fid in your table. Whenever you need to do something with the file use the fid to get all the file information.

This question may be very interesing for you:
Managed file: the file used in the field may not be referenced

Check also the file_managed Form API element:
https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#managed_file