upload

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package upload implements file and image uploads to the fal storage backends, including the multipart path for large files. It is surfaced through fal.Client (Upload, UploadFile, UploadImage) and the matching package-level functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Upload

func Upload(ctx context.Context, core *transport.Core, data []byte, contentType, fileName string, o *option.CallOptions) (string, error)

Upload uploads raw data and returns its public URL. fileName may be "". It mirrors fal_client.upload / SyncClient.upload.

func UploadFile

func UploadFile(ctx context.Context, core *transport.Core, path string, o *option.CallOptions) (string, error)

UploadFile uploads a local file and returns its public URL. The content type is detected from the extension. It mirrors fal_client.upload_file.

func UploadImage

func UploadImage(ctx context.Context, core *transport.Core, img image.Image, format encode.ImageFormat, o *option.CallOptions) (string, error)

UploadImage encodes an image and uploads it. It mirrors fal_client.upload_image.

Pass encode.FormatJPEG or encode.FormatPNG for an explicit, self-documenting call. The zero value (empty ImageFormat) defaults to JPEG, matching fal_client.upload_image's format="jpeg" default.

Types

This section is empty.

Jump to

Keyboard shortcuts

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