datopian / ckanext-blob-storage

CKAN extension to offload blob storage to cloud storage providers (S3, GCS, Azure etc).
http://tech.datopian.com/blob-storage/
MIT License
14 stars 4 forks source link

Delete a file from the external storage when deleting a resource #33

Closed higorspinto closed 3 years ago

higorspinto commented 3 years ago

After deleting an uploaded resource, the resource disappears from the resource list of the related dataset. But after uploading the same file again, the UI displays a message informing that the file already exists in the external storage.

When a user deletes a resource in the edit resource view, the user expects that the resource is also deleted from the external storage.

Steps to reproduce:

  1. Create a dataset
  2. Create a resource
  3. Upload a file
  4. Delete the created resource
  5. Create a new resource
  6. Upload the same deleted file again
  7. UI shows a message warning the user that file already exists in the storage.

Screenshot from 2020-10-01 19-20-51

Acceptance

higorspinto commented 3 years ago

After discussing with @anuveyatsu and @mariorodeghiero, we concluded that the message indicates that the file is already in storage, and we can continue editing metadata and publishing the resource. The action taken here is to display a better message to the user, and it needs to be done in DataPub.