Making sure data is available in the backend

I am building an application that takes uploaded csv files and displays them in a table, allowing for various filtering and sorting tools. I have built the backend and can upload files in the database, but now I am trying to get the data from the backend with an axios call and want to make sure that this get call only takes place after the data is uploaded. How can I make sure that the axios get calls in the frontend do not fire before the data is available? I was thinking of using a setInterval and make repeated get calls until I get a positive response or it times out, but that seems wasteful and inefficient. Is there a better way of doing this?

I would think you would be getting some sort of response from the server when the file is uploaded and that response would include the data object.