@alvincrespo/hashnode-content-converter - v0.2.2
    Preparing search index...

    Class ImageDownloader

    Service for downloading images from URLs with retry logic and error handling

    Index

    Constructors

    Methods

    • Apply rate limiting delay between downloads

      Returns Promise<void>

      Promise that resolves after the configured delay

    • Download a file from a URL and save it to the specified filepath. Returns a result object with success status and error details.

      Parameters

      • url: string

        The URL to download from

      • filepath: string

        The local path where the file will be saved

      Returns Promise<DownloadResult>

      Download result with success status, error details, and 403 flag

    • Extract image hash from Hashnode CDN URL Pattern: UUID.extension (e.g., 550e8400-e29b-41d4-a716-446655440000.png)

      Parameters

      • url: string

        The image URL

      Returns string | null

      The extracted hash with extension, or null if not found