DeepMicroscopy/Exact

Thumbnail not deleted -> registration problems after reupload

maubreville opened this issue · 1 comments

When an image is deleted (tested from the API), the thumbnail image still resides in the file system.

This leads to the following chain of errors:

  • When uploading another image with the same filename, the new thumbnail is not being generated (as it already exists)
  • When trying to register this new image (which utilizes the thumbnail apparently), the registration fails.

Steps to reproduce:

  • Upload an image (e.g. 1.tiff)
  • Delete the image
  • Finding 1: 1_thumbnail.png still resides in the data directory
  • Upload other image with same filename (1.tiff)
  • Finding 2: 1_thumbnail.png was not updated.

In Exact/images/api_views.py:478 the destroy() routine also does not include removing the thumbnail.

Moin,

tanks you very much for pointing out that error and creating a PR.

With kind regards,
Christian