Reference

Subpath exports and the tiered error messages uploaderkit surfaces to developers versus to users.

Developer feedback

Two tiers, so a broken config surfaces where it can still be fixed:

  • ScopeError — thrown, eagerly. Configs that can never work: a malformed scope, an unknown scope name, duplicate slot ids, a private scope on a non-signing provider, an encrypted scope without CryptoHooks. They fail at import or boot, never in front of a user. The framework adapters rethrow it instead of serializing it to the client.
  • Development warnings — once per issue. Configs that run but probably are not what you meant: calling upload() without a strategy, dropping several files in single mode, a slot accepting extensions its scope rejects. Prefixed [uploaderkit], silent in production, and never load-bearing for behavior.

Request-level failures are a third, separate family: StorageRequestError carries an HTTP status and a Spanish user-safe message, which the framework adapters map to JSON.

Subpath Exports

Import pathContents
uploaderkitdefineScopes, validateForScope, resolveKey, toAcceptAttribute, formatFileSize, KB/MB/GB, ScopeError, DEFAULT_LABELS/ES_LABELS, types
uploaderkit/reactuseUploader, useSlottedUploader, createXhrUploadStrategy, compressImage, slot matchers, types
uploaderkit/uiUploader, SlottedUploader, Dropzone, FileItem, FileViewer, ConfirmDialog, cn
uploaderkit/servercreateStorage, createAesGcmCrypto, StorageRequestError, types
uploaderkit/server/expresscreateExpressStorageHandlers — structural handlers for an Express app that owns multer
uploaderkit/server/nextcreateNextStorageHandlers — App Router handlers over the Fetch API
uploaderkit/adapters/gcscreateGcsProvider — two-bucket Google Cloud Storage (optional peer)
uploaderkit/adapters/s3createS3Provider — AWS, R2, B2, MinIO, Wasabi (optional peers)
uploaderkit/adapters/memorycreateMemoryProvider — tests and local development
uploaderkit/tailwind.cssTailwind v4 source registration for the /ui classes

License

MIT © Ricardo Tapia

On this page