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

Allow deleting file that is already deleted in Cloudinary #8410

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

arnellebalane
Copy link
Contributor

@arnellebalane arnellebalane commented Oct 20, 2020

What does it do?

Handle the case with strapi-provider-upload-cloudinary when trying to delete a file that is already deleted in Cloudinary. Cloudinary responds with { result: 'not found' } when trying to delete a non-existent file. This is added as an extra condition to be checked in strapi-provider-upload-cloudinary before throwing an error.

Why is it needed?

When using strapi-provider-upload-cloudinary and the file is already deleted in Cloudinary, that file cannot be deleted from the Strapi UI and throws an internal server error.

Related issue(s)/PR(s)

Fix #5729 Cannot delete file already deleted in Cloudinary

@arnellebalane arnellebalane requested a review from a team as a code owner October 20, 2020 19:02
Signed-off-by: Arnelle Balane <arnellebalane@gmail.com>
@codecov
Copy link

codecov bot commented Oct 20, 2020

Codecov Report

Merging #8410 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #8410   +/-   ##
=======================================
  Coverage   33.27%   33.27%           
=======================================
  Files        1220     1220           
  Lines       13625    13625           
  Branches     1357     1357           
=======================================
  Hits         4534     4534           
  Misses       8207     8207           
  Partials      884      884           
Flag Coverage Δ
#front 24.72% <ø> (ø)
#unit 54.69% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81c684d...558050c. Read the comment docs.

Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks for this improvement !

@alexandrebodin alexandrebodin added this to the 3.3.2 milestone Nov 10, 2020
@alexandrebodin alexandrebodin added source: core:upload Source is core/upload package issue: enhancement Issue suggesting an enhancement to an existing feature labels Nov 10, 2020
@alexandrebodin alexandrebodin merged commit e44dae0 into strapi:master Nov 10, 2020
RajNandigalla pushed a commit to RajNandigalla/strapi that referenced this pull request Nov 11, 2020
Signed-off-by: Arnelle Balane <arnellebalane@gmail.com>
Signed-off-by: Raj Nandigalla <raj.nandigalla@ril.com>
hdeadman pushed a commit to hdeadman/strapi that referenced this pull request Nov 12, 2020
Signed-off-by: Arnelle Balane <arnellebalane@gmail.com>
petersg83 pushed a commit that referenced this pull request Nov 13, 2020
Signed-off-by: Arnelle Balane <arnellebalane@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: enhancement Issue suggesting an enhancement to an existing feature source: core:upload Source is core/upload package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot delete file already deleted in Cloudinary
2 participants