secure client-side file upload