Server side Upload

Upload Images

Uploads a collection of image files.

  • Arguments

    • images: An array of File objects representing the images to be uploaded.
    • maxSize (optional): The maximum files size allowed.
    • maxFileCount (optional): The maximum number of images allowed to be uploaded in a single operation.
  • Returns

    • A Promise<{ files:BreezeFileType[]; error:string|null }> that resolves to an object containing information about the upload process, including completion and error details.
import { BreezeUploader, BreezeFileType } from "breeze-uploader-sdk";

const breeze = new BreezeUploader({
  apiKey: "YOUR_API_KEY",
  secretKey: "YOUR_SECRET_KEY",
});

await breeze.uploadImages({ images: Array.from(files) });

uploadVideos

Uploads a collection of video files.

  • Arguments

    • videos: An array of File objects representing the videos to be uploaded.
    • maxSize (optional): The maximum files size allowed.
    • maxFileCount (optional): The maximum number of videos allowed to be uploaded in a single operation.
  • Returns

    • A Promise<{ files:BreezeFileType[]; error:string|null }> that resolves to an object containing information about the upload process, including completion and error details.
import { BreezeUploader, BreezeFileType } from "breeze-uploader-sdk";

const breeze = new BreezeUploader({
  apiKey: "YOUR_API_KEY",
  secretKey: "YOUR_SECRET_KEY",
});

await breeze.uploadVideos({ videos: Array.from(files) });

uploadAnyFiles

Uploads a collection of files of any type.

  • Arguments

    • files: An array of File objects representing the files to be uploaded.
    • maxSize (optional): The maximum files size allowed.
    • maxFileCount (optional): The maximum number of files allowed to be uploaded in a single operation.
  • Returns

    • A Promise<{ files:BreezeFileType[]; error:string|null }> that resolves to an object containing information about the upload process, including completion and error details.
import { BreezeUploader, BreezeFileType } from "breeze-uploader-sdk";

const breeze = new BreezeUploader({
  apiKey: "YOUR_API_KEY",
  secretKey: "YOUR_SECRET_KEY",
});

await breeze.uploadAnyFiles({ files: Array.from(files) });
Docs and examples licensed under MIT