Code for seamless and silent upload