try catch for upload data