upload error - bugfix

fixed a bug where images didnt get deleted on failed uploads