Fix editor stuck if it crashed during media upload

Fixes #1669