One possible solution is to use a widget like the file dropper: https://marketplace.mendix.com/link/component/111497
Here you can implement logict before or after the upload.