Fix EZP-23030: image/media upload is broken, progress indicator never goes away

(cherry picked from commit 9f871624c3d19733d758ddf7fb80d045c855c68a)