Direct access is not the way how NC is working. You should use WebDav (what is more slower as SMB). Otherwise you can set some local folder as External Storage and give NC access to it --> https://docs.nextcloud.com/server/15/admin_manual/configuration_files/external_storage_configuration_gui.html#adding-files-to-external-storages
Do not forget that you have to re scan changes periodically (otherwise folder will be re scanned only by direct web access). Command to do this is: sudo -u www-data php occ files:scan --all
This command will rescan whole NC installation together with all internal and external files, so I wrote a script to do external storage rescan only:
Read more about this script under this tread: Automate OCC Filescan