Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add customIds #587

Merged
merged 13 commits into from
Feb 6, 2024
Merged

feat: add customIds #587

merged 13 commits into from
Feb 6, 2024

Conversation

juliusmarminge
Copy link
Collaborator

@juliusmarminge juliusmarminge commented Jan 30, 2024

the API here might not be ideal but anything else would require a breaking change i think...

Copy link

changeset-bot bot commented Jan 30, 2024

🦋 Changeset detected

Latest commit: 1803c21

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
uploadthing Minor
@uploadthing/shared Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jan 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-uploadthing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2024 10:30pm

@github-actions github-actions bot added the sdk label Jan 30, 2024
@juliusmarminge juliusmarminge added release canary Trigger a canary release to npm and removed sdk labels Jan 30, 2024
Copy link
Contributor

A new canary is available for testing. You can install this latest build in your project with:

pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add [email protected]

@github-actions github-actions bot removed the release canary Trigger a canary release to npm label Jan 30, 2024
Copy link
Contributor

A new canary is available for testing. You can install this latest build in your project with:

pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add [email protected]

@github-actions github-actions bot removed the release canary Trigger a canary release to npm label Jan 30, 2024
@juliusmarminge juliusmarminge changed the title feat: add customId to sdk feat: add customIds Jan 31, 2024
// bind custom id when uploading
f(["image"])
.middleware(({ files }) => {
const filesWithIds = files.map((f) => ({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this is fine for now, but we should rethink the structure of this builder pattern in the future. Likely needs to be multi-step, i.e. "authenticate", "preUpload" and "onUploadComplete"

@markflorkowski markflorkowski merged commit 83e544d into main Feb 6, 2024
10 checks passed
@juliusmarminge juliusmarminge deleted the customId-sdk branch February 29, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants