Skip to content

Conversation

kitherill
Copy link
Contributor

@kitherill kitherill commented May 22, 2025

Resolves #24

Added functionality:

  1. New assets folder is created in the output location.
  2. Inline images are exported as ./assets/<hash from base64 data>.<extension based on mime type>
  3. As a last resort, images are downloaded from the url and stored as ./assets/<hash from src value>.<extension based on mime type or URL>

url = confluence.url + src if src.startswith("/") else src

# Use existing confluence session for other URLs
response = confluence._session.get(url)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Heads-up: if the session ends up having retrial enabled (there's a PR), this might be an overkill for the image downloading (in my case I had many 404/host name resolution errors). In this case it's better to use requests.get(), but it will lack the Atlassian auth.

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.

Images that have no attachment ID are not exported
1 participant