remote

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package remote downloads media from HTTP(S) URLs for WeChat upload.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(ctx context.Context, rawURL string) (data []byte, fileName string, err error)

Download fetches a remote URL and returns the body bytes plus a suggested filename. The context controls the request timeout/cancellation. Downloads are capped at 100 MiB to avoid unbounded memory use.

func DownloadWithClient added in v0.3.0

func DownloadWithClient(ctx context.Context, client *http.Client, rawURL string) (data []byte, fileName string, err error)

DownloadWithClient fetches a remote URL using the supplied HTTP client.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL