Function to upload metadata