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

feat: new function set_content_image(), deprecate old set_image_* functions #302

Closed
wants to merge 1 commit into from

Conversation

toph-allen
Copy link
Collaborator

Fixes #294

  • Deprecate set_image_path(content, path), set_image_url(content, url), set_image_webshot(content).
  • Add a new function, set_content_image(content, path). The new function can handle a local file path or a remote URL. If the path points to a local file that exists, it will use that. Otherwise, if it is an https or http URL, it will attempt to download that image to a temporary file and use that (the old behavior of set_image_url().

In a future PR to the connect repo, set_image_webshot() will become a recipe in the SDK Cookbook.

Note: this wasn't based off the 0.3.0 release, so the NEWS will have a merge conflict once that PR has merged. Not sure why I started it from main, but I did 🤷🏻.

@toph-allen toph-allen closed this Sep 6, 2024
@toph-allen toph-allen deleted the toph/simplify_content_image_functions branch September 6, 2024 19:57
@toph-allen toph-allen restored the toph/simplify_content_image_functions branch September 6, 2024 19:57
@toph-allen toph-allen deleted the toph/simplify_content_image_functions branch September 6, 2024 19:57
@toph-allen
Copy link
Collaborator Author

Oops, accidentally closed with a force push.

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.

simplify set_image_*() functions
1 participant