In the marketplace you have a widget for that: Native file documents https://marketplace.mendix.com/link/component/114252
There is also a whole demo project for it.
Regards,
Ronald