Craft 3 Custom Field Type with a File Uploader
Just as a little example how to store files in a custom field

/**
 * @inheritdoc
 */
public function normalizeValue($value, ElementInterface $element = null)
{

    $namespace = $element? $element-&gt;getFieldParamNamespace() . '.' : '';
    $file = UploadedFile::getInstanceByName($namespace . $this-&gt;handle);
    if($file !== null){
        // replace this
        $somePath = __DIR__ . DIRECTORY_SEPARATOR . $file-&gt;name;
        $file-&gt;saveAs($somePath);
    }
    return $file;
}

/**
 * @inheritdoc
 */
public function getInputHtml($value, ElementInterface $element = null): string
{
    Craft::$app-&gt;getView()-&gt;registerJs('Craft.cp.$primaryForm.attr(\'enctype\', \'multipart/form-data\');');
    return '&lt;input type="file" name="' . $this-&gt;handle . '"&gt;';
}


Edit:

If you want to store the file path in your Database you would check if $value is an instance of File and if so return the path. Otherwise just declare your field has contentColumn = false