Add "download" function on client side