Skip to content

Commit

Permalink
add uploadthing preset (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
jln13x authored Mar 19, 2024
1 parent 1d5b625 commit 794934e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/app/docs/customization/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ env.VERCEL_URL; // string
T3 Env ships the following presets out of the box, all importable from the `/presets` entrypoint.

- `vercel` - Vercel environment variables. See full list [here](https://vercel.com/docs/projects/environment-variables/system-environment-variables#system-environment-variables).
- `uploadthing` - All environment variables required to use [UploadThing](https://uploadthing.com/). More info [here](https://docs.uploadthing.com/getting-started/appdir#add-env-variables).

<Callout type="info">

Expand Down
11 changes: 11 additions & 0 deletions packages/core/src/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,14 @@ export const vercel = createEnv({
},
runtimeEnv: process.env,
});

/**
* @see https://docs.uploadthing.com/getting-started/appdir#add-env-variables
*/
export const uploadthing = createEnv({
server: {
UPLOADTHING_SECRET: z.string(),
UPLOADTHING_APP_ID: z.string().optional(),
},
runtimeEnv: process.env,
});

0 comments on commit 794934e

Please sign in to comment.