File Upload in a Queue

I’ve created a nice App which allows user to upload an XLS, then lets them review the first few rows and do some lightweight processing on it (change column names), then sends it to an API.

The problem is that some of the XLS are > 50mb, which obviously ties up the UI. I really don’t need the whole file uploaded right away for the lightweight processing, really only top 10 rows.

Using the stream file uploader, it has to take in the whole file. Possible to just read a subset of the data, and then pull the rest in through a queue, and then that sent to API when complete?

Thank you

Hi @ari, welcome to the Streamlit community!

No, it’s not possible to read a subset of the data, as the majority of processing happens on the Python side. To accomplish what you are talking about, we’d have to build file reading logic for many types of files into the Streamlit JS side, which could be complex depending on all of the different types of files types out there.