Skip to content

Conversation

@slaveeks
Copy link

@slaveeks slaveeks commented Jul 4, 2024

  1. Added ImageResolver module for working with custom downloading
  2. Added imageResolver field to config, which stores download method for custom downloading
  3. Added inResolve method to use data, which is returned after downloading

@slaveeks slaveeks requested a review from neSpecc July 4, 2024 16:32
@slaveeks slaveeks requested a review from neSpecc July 4, 2024 19:58
@slaveeks slaveeks changed the title feat: added custom downloader feat: added custom image resolver Jul 4, 2024
@slaveeks slaveeks requested a review from neSpecc July 5, 2024 00:27
README.md Outdated
| -------------- | --------- | ------------- | ------------|
| resolveUrlByFileData | `fileData`| `Promise.<string>` | Resolve image url by file data |

`fileData` - any data, which is needed for resolving url
Copy link
Contributor

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?

Copy link
Author

Choose a reason for hiding this comment

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

updated desc

@slaveeks slaveeks requested a review from neSpecc July 5, 2024 00:32
@neSpecc neSpecc mentioned this pull request Mar 21, 2025
*/
validate(savedData) {
return savedData.file && savedData.file.url;
return savedData.file;

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants