One of the fields type in the database is URL. After adding a dataset to your page, connect the attach element to this field, as a result after submitting you will see in the database all your form’s data include the url of the doc.
View this article to learn how to create a form with user input elements https://support.wix.com/en/article/creating-a-form-with-user-input-elements