You must ensure your cart does not use Ajax since 99% of adding to cart with Ajax do not support file uploads.
Ajax cart means that your visitor will stay on the same product page after adding item to cart with some note or drawer/slider cart displayed.
(though being redirected to a cart page is not a 100% guarantee).
If unsure -- share the link to your shop.
If you want to upload file using Ajax then we can but for that we have to change some code and if you want to show preview of uploaded image on cart page then also we have to add some code on cart page like <img> tag that will show preview.