Skip to content

Commit

Permalink
use Explicit method in getAsset (not rate limited)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkumar-gcc committed Aug 5, 2023
1 parent 36d2590 commit c6772e5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cloudinary.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,11 @@ func (r *Cloudinary) Url(file string) string {
return asset.SecureURL
}

func (r *Cloudinary) getAsset(path string) (*admin.AssetResult, error) {
return r.instance.Admin.Asset(r.ctx, admin.AssetParams{
PublicID: r.getPublicId(path),
AssetType: api.AssetType(r.getResourceType(path)),
func (r *Cloudinary) getAsset(path string) (*uploader.ExplicitResult, error) {
return r.instance.Upload.Explicit(r.ctx, uploader.ExplicitParams{
PublicID: r.getPublicId(path),
Type: "upload",
ResourceType: r.getResourceType(path),
})
}

Expand Down

0 comments on commit c6772e5

Please sign in to comment.