github pingdotgg/uploadthing @uploadthing/shared@7.1.0

Minor Changes

  • #1008 3acc199 Thanks @juliusmarminge! - feat: add support to specify route endpoint that supports "Go to Definition"

    All places that accept the endpoint argument now additionally accept a function that gets a route registry as input and returns the endpoint to use. This allows for "Go to Definition" to go to the backend route definition directly from the component.

    Examples

    // uploadthing/client#uploadFiles
    uploadFiles(
        (routeRegistry) => routeRegistry.videoAndImage,
        { ... }
    )
    
    // uploadthing/react#useUploadThing
    useUploadThing(
        (routeRegistry) => routeRegistry.videoAndImage,
        { ... }
    )
    
    // uploadthing/react#UploadButton
    <UploadButton
        endpoint={(routeRegistry) => routeRegistry.videoAndImage}
        { ... }
    />

Patch Changes

Don't miss a new uploadthing release

NewReleases is sending notifications on new releases.