-
-
Notifications
You must be signed in to change notification settings - Fork 302
feat: added custom image resolver #253
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Peter Savchenko <[email protected]>
Co-authored-by: Peter Savchenko <[email protected]>
README.md
Outdated
| | -------------- | --------- | ------------- | ------------| | ||
| | resolveUrlByFileData | `fileData`| `Promise.<string>` | Resolve image url by file data | | ||
|
|
||
| `fileData` - any data, which is needed for resolving url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it an any data returned from the server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated desc
| */ | ||
| validate(savedData) { | ||
| return savedData.file && savedData.file.url; | ||
| return savedData.file; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not make sense to have similar logic here like we see in the resolveUrlByFileData function. Ie, check that the data contains an url in case a resolver is not defined. To limit how much slack is put on the data guarantees
ImageResolvermodule for working with custom downloadingimageResolverfield to config, which storesdownloadmethod for custom downloadinginResolvemethod to use data, which is returned after downloading