Am created file upload functionality through custom module in Magento 2 category tab.i don't know how to save the file in database.please can any one tell me how to do that?
add use Magento\Framework\UrlInterface;
add use Magento\Framework\Filesystem;
...
$imageName = $this->uploadFileAndGetName('input_name', $this->fileSystem->getDirectoryWrite(DirectoryList::MEDIA)->getAbsolutePath($subdir_of_your_choice.'/image'));
$your_model->setImage($imageName);