Added functionality for client side upload.