github pingdotgg/uploadthing @uploadthing/shared@6.3.0

Minor Changes

  • #587 83e544d Thanks @juliusmarminge! - feat: add ability to provide custom identifiers when uploading files

    also adds ability for UTApi methods to filter based on custom identifiers

    // bind custom id when uploading
    f(["image"]).middleware(({ files }) => {
      const filesWithIds = files.map((f) => ({
        ...f,
        customId: uuid(),
      }));
      return { my: "metadata", [UTFiles]: filesWithIds };
    });
    
    // filter based on custom id
    const utapi = new UTApi();
    utapi.getFileUrl("my-uuid", { keyType: "customId" });
    
    // or, set a global keyType default
    const utapi = new UTApi({ defaultKeyType: "customId" });
    utapi.getFileUrl("my-uuid");
  • #598 04d145e Thanks @juliusmarminge! - feat: use presigned post uploads for small files to reduce overhead time of multipart

Patch Changes

Don't miss a new uploadthing release

NewReleases is sending notifications on new releases.