Skip to content

Releases: pingdotgg/uploadthing

@uploadthing/[email protected]

20 Nov 22:24
ce30313
Compare
Choose a tag to compare

Patch Changes

@uploadthing/[email protected]

20 Nov 22:24
ce30313
Compare
Choose a tag to compare

Patch Changes

[email protected]

15 Nov 17:15
3b04469
Compare
Choose a tag to compare

Patch Changes

[email protected]

14 Nov 22:42
d4ea3ba
Compare
Choose a tag to compare

Major Changes

  • #351
    0ef63c6
    Thanks @juliusmarminge! - feat: support
    returning data from the serverside onUploadComplete callback to the
    clientside onClientUploadComplete. This change also ensures the serverside
    callback will finish before the clientside one is invoked.

    This change has required reworking some types, most notably for people who
    were importing the UploadThing components directly from @uploadthing/react
    and @uploadthing/solid instead of generating their own typesafe components
    using generateComponents. We have always recommended using
    generateComponents, but now we're emphasising it even more.

  • #432
    328f59b
    Thanks @juliusmarminge! - feat!:
    multipart uploads

    supports uploading larger files and uploads are now up to 2x faster

  • #310
    7c2ed64
    Thanks @juliusmarminge! - feat: support
    arbitrary callback URLs (serving router from any endpoint). To use a different
    endpoint than /api/uploadthing, you can pass the url parameter to
    generateComponents and generateReactHelpers/generateSolidHelpers (or
    pass it as a prop to the components if you're not generating them):

    export const { UploadButton, UploadDropzone } = generateComponents({
      url: "/api/my-upload-endpoint", // if the host is unchanged from default (localhost or VERCEL_URL)
      // url: "https://my-custom-host.com" // if the host is different but path is /api/uploadthing
      // url: "https://my-custom-host.com/my-custom-endpoint" // fully custom url
    });
  • #459
    f32f5c0
    Thanks @juliusmarminge! - feat!: change
    sdk function arguments to be an option object instead of positional arguments

    the signature of UTApi.uploadFiles and UTApi.uploadFilesFromUrl has
    changed to be easier to add new options in the future.

    - uploadFiles(files, metadata, contentDisposition)
    + uploadFiles(files, { metadata, contentDisposition })
    
    - uploadFilesFromUrl(urls, metadata, contentDisposition)
    + uploadFilesFromUrl(urls, { metadata, contentDisposition })
  • #459
    f32f5c0
    Thanks @juliusmarminge! - chore!: remove
    deprecated utapi object in preference of using constructor

    the default UTApi was exported as utapi from uploadthing/server. this was
    deprecated in v5.7 in favor of using the constructor directly.

    - import { utapi } from 'uploadthing/server'
    + import { UTApi } from 'uploadthing/server'
    +
    + export const utapi = new UTApi(opts)

    For full API spec of UTAPI see
    the the server API reference.

    This update removes the deprecated utapi export.

    In conjunction with this, we have moved certain guards to be in the
    constructor instead of in individual methods. This means that the constructor
    will throw if there is no apiKey passed as object or UPLOADTHING_SECRET in
    env, instead of this error being delayed until the method call.

Minor Changes

  • #453
    0aae926
    Thanks @joelhooks! - Adds an
    onBeforeUploadBegin callback that is called before startUpload to allow for
    pre-processing of files (ie changing file names etc)

Patch Changes

  • #451
    1241a16
    Thanks @juliusmarminge! - chore: log out
    error if it's an unknown (not UploadThingError)

    This log should not ever happen, but if it does we want it to be easy to
    provide the error when reporting the bug to us.

    "Normal" errors are never logged and you have full control over how to handle
    them in your onUploadError handler.

  • Updated dependencies
    [328f59b]:

@uploadthing/[email protected]

14 Nov 22:42
d4ea3ba
Compare
Choose a tag to compare

Major Changes

  • #351
    0ef63c6
    Thanks @juliusmarminge! - feat: support
    returning data from the serverside onUploadComplete callback to the
    clientside onClientUploadComplete. This change also ensures the serverside
    callback will finish before the clientside one is invoked.

    This change has required reworking some types, most notably for people who
    were importing the UploadThing components directly from @uploadthing/react
    and @uploadthing/solid instead of generating their own typesafe components
    using generateComponents. We have always recommended using
    generateComponents, but now we're emphasising it even more.

  • #310
    7c2ed64
    Thanks @juliusmarminge! - feat: support
    arbitrary callback URLs (serving router from any endpoint). To use a different
    endpoint than /api/uploadthing, you can pass the url parameter to
    generateComponents and generateReactHelpers/generateSolidHelpers (or
    pass it as a prop to the components if you're not generating them):

    export const { UploadButton, UploadDropzone } = generateComponents({
      url: "/api/my-upload-endpoint", // if the host is unchanged from default (localhost or VERCEL_URL)
      // url: "https://my-custom-host.com" // if the host is different but path is /api/uploadthing
      // url: "https://my-custom-host.com/my-custom-endpoint" // fully custom url
    });

Minor Changes

  • #453
    0aae926
    Thanks @joelhooks! - Adds an
    onBeforeUploadBegin callback that is called before startUpload to allow for
    pre-processing of files (ie changing file names etc)

  • #451
    1241a16
    Thanks @juliusmarminge! - typed
    UploadThingError in onUploadError handler

Patch Changes

@uploadthing/[email protected]

14 Nov 22:42
d4ea3ba
Compare
Choose a tag to compare

Major Changes

  • #432
    328f59b
    Thanks @juliusmarminge! - feat!:
    multipart uploads

    supports uploading larger files and uploads are now up to 2x faster

@uploadthing/[email protected]

14 Nov 22:42
d4ea3ba
Compare
Choose a tag to compare

Major Changes

  • #351
    0ef63c6
    Thanks @juliusmarminge! - feat: support
    returning data from the serverside onUploadComplete callback to the
    clientside onClientUploadComplete. This change also ensures the serverside
    callback will finish before the clientside one is invoked.

    This change has required reworking some types, most notably for people who
    were importing the UploadThing components directly from @uploadthing/react
    and @uploadthing/solid instead of generating their own typesafe components
    using generateComponents. We have always recommended using
    generateComponents, but now we're emphasising it even more.

  • #310
    7c2ed64
    Thanks @juliusmarminge! - feat: support
    arbitrary callback URLs (serving router from any endpoint). To use a different
    endpoint than /api/uploadthing, you can pass the url parameter to
    generateComponents and generateReactHelpers/generateSolidHelpers (or
    pass it as a prop to the components if you're not generating them):

    export const { UploadButton, UploadDropzone } = generateComponents({
      url: "/api/my-upload-endpoint", // if the host is unchanged from default (localhost or VERCEL_URL)
      // url: "https://my-custom-host.com" // if the host is different but path is /api/uploadthing
      // url: "https://my-custom-host.com/my-custom-endpoint" // fully custom url
    });

Minor Changes

  • #453
    0aae926
    Thanks @joelhooks! - Adds an
    onBeforeUploadBegin callback that is called before startUpload to allow for
    pre-processing of files (ie changing file names etc)

Patch Changes

[email protected]

01 Nov 12:05
c29e21b
Compare
Choose a tag to compare

@uploadthing/[email protected]

01 Nov 12:05
c29e21b
Compare
Choose a tag to compare

@uploadthing/[email protected]

01 Nov 12:05
c29e21b
Compare
Choose a tag to compare

Patch Changes