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 withoutCryptoHooks. 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 path | Contents |
|---|---|
uploaderkit | defineScopes, validateForScope, resolveKey, toAcceptAttribute, formatFileSize, KB/MB/GB, ScopeError, DEFAULT_LABELS/ES_LABELS, types |
uploaderkit/react | useUploader, useSlottedUploader, createXhrUploadStrategy, compressImage, slot matchers, types |
uploaderkit/ui | Uploader, SlottedUploader, Dropzone, FileItem, FileViewer, ConfirmDialog, cn |
uploaderkit/server | createStorage, createAesGcmCrypto, StorageRequestError, types |
uploaderkit/server/express | createExpressStorageHandlers — structural handlers for an Express app that owns multer |
uploaderkit/server/next | createNextStorageHandlers — App Router handlers over the Fetch API |
uploaderkit/adapters/gcs | createGcsProvider — two-bucket Google Cloud Storage (optional peer) |
uploaderkit/adapters/s3 | createS3Provider — AWS, R2, B2, MinIO, Wasabi (optional peers) |
uploaderkit/adapters/memory | createMemoryProvider — tests and local development |
uploaderkit/tailwind.css | Tailwind v4 source registration for the /ui classes |
License
MIT © Ricardo Tapia