Handle the case where the file was accepted on upload and its hash saved
to the imports table but the batch insert of hosts fails, rolls back and leaves the hash in the imports table. This case would prevent the user from ever successfully uploading that file.
The simple fix is to write a file import delete method and call it with the file hash if the hosts batch insert fails.
Handle the case where the file was accepted on upload and its hash saved
to the imports table but the batch insert of hosts fails, rolls back and leaves the hash in the imports table. This case would prevent the user from ever successfully uploading that file.
The simple fix is to write a file import delete method and call it with the file hash if the hosts batch insert fails.