Releases: pingdotgg/uploadthing
@uploadthing/[email protected]
Patch Changes
- #480
67109c8
Thanks @juliusmarminge! - fix: serverdata
polling timed out and returned 504
@uploadthing/[email protected]
Patch Changes
-
#480
67109c8
Thanks @juliusmarminge! - fix: serverdata
polling timed out and returned 504 -
Updated dependencies
[67109c8
]:- @uploadthing/[email protected]
[email protected]
Patch Changes
- #469
7973a68
Thanks @juliusmarminge! - fix: fallback
to null as serverdata to ensure json compatibility
[email protected]
Major Changes
-
#351
0ef63c6
Thanks @juliusmarminge! - feat: support
returning data from the serversideonUploadComplete
callback to the
clientsideonClientUploadComplete
. 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
usinggenerateComponents
. We have always recommended using
generateComponents
, but now we're emphasising it even more. -
#432
328f59b
Thanks @juliusmarminge! - feat!:
multipart uploadssupports 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 theurl
parameter to
generateComponents
andgenerateReactHelpers
/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 argumentsthe signature of
UTApi.uploadFiles
andUTApi.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
deprecatedutapi
object in preference of using constructorthe default UTApi was exported as
utapi
fromuploadthing/server
. this was
deprecated inv5.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 noapiKey
passed as object orUPLOADTHING_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 youronUploadError
handler. -
Updated dependencies
[328f59b
]:- @uploadthing/[email protected]
@uploadthing/[email protected]
Major Changes
-
#351
0ef63c6
Thanks @juliusmarminge! - feat: support
returning data from the serversideonUploadComplete
callback to the
clientsideonClientUploadComplete
. 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
usinggenerateComponents
. 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 theurl
parameter to
generateComponents
andgenerateReactHelpers
/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 inonUploadError
handler
Patch Changes
- Updated dependencies
[0ef63c6
,
0aae926
,
328f59b
,
7c2ed64
,
f32f5c0
,
f32f5c0
,
1241a16
]:- [email protected]
- @uploadthing/[email protected]
@uploadthing/[email protected]
Major Changes
-
#432
328f59b
Thanks @juliusmarminge! - feat!:
multipart uploadssupports uploading larger files and uploads are now up to 2x faster
@uploadthing/[email protected]
Major Changes
-
#351
0ef63c6
Thanks @juliusmarminge! - feat: support
returning data from the serversideonUploadComplete
callback to the
clientsideonClientUploadComplete
. 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
usinggenerateComponents
. 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 theurl
parameter to
generateComponents
andgenerateReactHelpers
/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
-
#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 youronUploadError
handler. -
Updated dependencies
[0ef63c6
,
0aae926
,
328f59b
,
7c2ed64
,
f32f5c0
,
f32f5c0
,
1241a16
]:- [email protected]
- @uploadthing/[email protected]
[email protected]
- Updated dependencies
[eb5f96d
]:- @uploadthing/[email protected]
- @uploadthing/[email protected]
@uploadthing/[email protected]
- Updated dependencies
[eb5f96d
]:- @uploadthing/[email protected]
@uploadthing/[email protected]
Patch Changes
- #448
eb5f96d
Thanks @juliusmarminge! - fix: remove
traces of leaking zod dependency