File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
photon-client/src/components/settings Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,23 @@ const handleImport = async () => {
4545
4646 axios
4747 .post (" /objectdetection/import" , formData , {
48- headers: { " Content-Type" : " multipart/form-data" }
48+ headers: { " Content-Type" : " multipart/form-data" },
49+ onUploadProgress : ({ progress }) => {
50+ const uploadPercentage = (progress || 0 ) * 100.0 ;
51+ if (uploadPercentage < 99.5 ) {
52+ useStateStore ().showSnackbarMessage ({
53+ message: " Object Detection Model Upload in Process, " + uploadPercentage .toFixed (2 ) + " % complete" ,
54+ color: " secondary" ,
55+ timeout: - 1
56+ });
57+ } else {
58+ useStateStore ().showSnackbarMessage ({
59+ message: " Processing uploaded Object Detection Model..." ,
60+ color: " secondary" ,
61+ timeout: - 1
62+ });
63+ }
64+ }
4965 })
5066 .then ((response ) => {
5167 useStateStore ().showSnackbarMessage ({
You can’t perform that action at this time.
0 commit comments