Class: JekyllImgFlow::Helpers::HttpDownloader

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-imgflow/helpers/http_downloader.rb

Overview

HTTP Downloader - handles downloading images from HTTP/HTTPS/file:// URLs

Class Method Summary collapse

Class Method Details

.download(url) ⇒ String

Download a file from URL to temporary location

Parameters:

Returns:

  • (String)

    Path to downloaded temporary file



16
17
18
19
20
21
22
23
24
25
# File 'lib/jekyll-imgflow/helpers/http_downloader.rb', line 16

def self.download(url)
  uri = URI(url)

  # Handle file:// URLs for local file processing
  if uri.scheme == "file"
    download_file_url(uri)
  else
    download_http_url(uri)
  end
end