Don't break the whole server if an import failed because no files were uploaded

Fixes #1611