Collection Upload Options: adminThumbnail to return a promise #4507
smoglica
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice to add an additional return type of
adminThumbnail
function. The return type that I meant isPromise<string>
.Why?
I use Thumbor as image service. In order to be able to create a safe URL for avoiding URL Tampering I need to use
crypto
(with node 20) object for generating a HMAC SHA1 security key. Methodscrypto.subtle.importKey
andcrypto.subtle.sign
are async, so I need toawait
and then the desired function is async.I immagine something like this:
Beta Was this translation helpful? Give feedback.
All reactions