Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] - Deletion of file from the CDN when deleting/editing document from collection #527

Closed
mattvan83 opened this issue Jan 24, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@mattvan83
Copy link

Summary

As it is possible to upload file and manage its upload to CDN using the handler.upload function in the options.tsx file, it would be beneficial also to enable to remove this file from the CDN when:

  1. The document associated to the collection is deleted from the list view from its row
  2. When editing the document in edit view and clearing the existing the existing file from CDN

Basic Example

This is one example of how one could manage the deletion of file from the CDN when deleting the document from row on list view:

        fields: {
          thumbnailUrl: {
            format: "file",
            handler: {
              delete: async (buffer, { name }) => {}
            },
          },
        },

Drawbacks

No response

Unresolved questions

For the clearing of file in edit view, I have at the moment no idea of how to implement this.

@mattvan83 mattvan83 added the enhancement New feature or request label Jan 24, 2025
@foyarash
Copy link
Collaborator

foyarash commented Feb 5, 2025

Hi @mattvan83 , this is now available on v7.3.0

@foyarash foyarash closed this as completed Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants