S
Solara4mo ago
Helleeni

How to show progress of FileDrop?

Apparently solara.FileDrop can show the progress of the file being read. This would be great in my app as reading an excel file with few thousand lines can (in my setup) take minutes and it would be great to show progress to the user. I just can't figure out how it should be done? Documentation says this: @solara.component def FileDrop( label="Drop file here", on_total_progress: Optional[Callable[[float], None]] = None, on_file: Optional[Callable[[FileInfo], None]] = None, lazy: bool = True, ): I can't find any example as how to implement 'on_total_progress' part to show the progress. Any hint as how it should be done would be great.
2 Replies
MaartenBreddels
MaartenBreddels4mo ago
The filedrop progress if for the status of the uploading, which is your case is probably instant,. Maybe you want to do the processing with a progress bar, there is an example here: https://solara.dev/documentation/components/lab/task Does that help?
Helleeni
HelleeniOP4mo ago
You are right. It's my processing code that makes it slow. Thanks for the instruction - I'll give progress bar a go.
Want results from more Discord servers?
Add your server