UNPKG

sdk-imagebb

Version:

Modern, lightweight TypeScript library for uploading images to ImgBB API. Features React 19 & Node 24 support, promise-based async/await interface, automatic error handling, and configurable expiration. Perfect for building image upload functionality in R

22 lines 668 B
import { ImgbbUploadOptions, Root } from "./interface"; type imgbbUploadType = (options: ImgbbUploadOptions) => Promise<Root>; /** * Upload an image to ImgBB * @param options - Upload configuration options * @returns Promise resolving to the upload response * @throws {Error} When upload fails or API returns an error * @example * ```typescript * const result = await imgbbUpload({ * key: 'your-api-key', * image: fileFromInput, * name: 'my-image', * expiration: 600 * }); * console.log(result.data.url); * ``` */ declare const imgbbUpload: imgbbUploadType; export { imgbbUpload }; export default imgbbUpload; //# sourceMappingURL=index.d.ts.map