Skip to content

Commit

Permalink
Merge branch 'main' into plain-app-id
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge committed Oct 8, 2024
2 parents b281a5c + eba5f69 commit 37a73ff
Show file tree
Hide file tree
Showing 161 changed files with 5,914 additions and 16,153 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ packages/*/*/
!packages/*/playground/

dist
tsup.config.bundled_*
app.config.bundled_*

.svelte-kit
.solid
Expand Down
11,403 changes: 0 additions & 11,403 deletions docs/pnpm-lock.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions docs/src/app/(docs)/api-reference/react/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const UploadDropzone = generateUploadDropzone<OurFileRouter>();

The `generateReactHelpers` function is used to generate the
[useUploadThing](/api-reference/react#use-upload-thing) hook and the
[uploadFiles]/api-reference/client#upload-files) functions you use to interact
[uploadFiles](/api-reference/client#upload-files) functions you use to interact
with UploadThing in custom components. It takes your File Router as a generic

```tsx
Expand Down Expand Up @@ -547,7 +547,7 @@ and `useUploadThing` hooks. For a more complete example, take a look at
[our prebuilt components](https://github.com/pingdotgg/uploadthing/tree/main/packages/react/src/components).

```tsx {{ title: "app/example-custom-uploader.tsx" }}
// import { useDropzone } from "@uploadthing/react";
import { useDropzone } from "@uploadthing/react";
import { generateClientDropzoneAccept } from "uploadthing/client";

import { useUploadThing } from "~/utils/uploadthing";
Expand Down
9 changes: 9 additions & 0 deletions docs/src/app/(docs)/api-reference/server/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,15 @@ Environment variables follows the naming convention of `UPLOADTHING_<NAME>`
Enable more verbose logging.
<Note>If using an older version of the SDK, levels might vary.</Note>
</Property>
<Property
name="logFormat"
type="json | logFmt | structured | pretty"
since="7.1"
defaultValue="pretty in development, else json"
>
What format log entries should be in. [Read more about the log formats
here](https://effect.website/docs/guides/observability/logging#built-in-loggers).
</Property>
<Property
name="isDev"
type="boolean"
Expand Down
9 changes: 9 additions & 0 deletions docs/src/app/(docs)/api-reference/ut-api/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ Environment variables follows the naming convention of `UPLOADTHING_<NAME>`
Enable more verbose logging.
<Note>If using an older version of the SDK, levels might vary.</Note>
</Property>
<Property
name="logFormat"
type="json | logFmt | structured | pretty"
since="7.1"
defaultValue="pretty in development, else json"
>
What format log entries should be in. [Read more about the log formats
here](https://effect.website/docs/guides/observability/logging#built-in-loggers).
</Property>
<Property
name="defaultKeyType"
type="'fileKey' | 'customId'"
Expand Down
12 changes: 7 additions & 5 deletions docs/src/app/(docs)/backend-adapters/fetch/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,13 @@ const handlers = createRouteHandler({
config: { ... },
});

const app = new Elysia().get("/", () => "Hello Elysia");

app.all("/api/uploadthing", handlers);

app.listen(3000);
new Elysia()
.get("/api", () => "Hello from Elysia!")
.get("/api/uploadthing", (ev) => handlers(ev.request))
.post("/api/uploadthing", (ev) => handlers(ev.request))
.listen(3000, (server) => {
console.log(`Server listening on port ${server.port}`);
});
```

### Hono
Expand Down
10 changes: 5 additions & 5 deletions docs/src/app/(docs)/getting-started/remix/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ of a FileRoute similar to an endpoint, it has:
To get full insight into what you can do with the FileRoutes, please refer to
the [File Router API](/file-routes).

```tsx {{ title: "routes/api.uploadthing.ts" }}
```tsx {{ title: "app/routes/api.uploadthing.ts" }}
import type { ActionFunctionArgs } from "@remix-run/node"; // or cloudflare/deno

import { createUploadthing, type FileRouter } from "uploadthing/remix";
Expand Down Expand Up @@ -97,7 +97,7 @@ exporting the action and loader functions.
serving it from `/api/uploadthing`.
</Note>

```ts {{ title: "routes/api.uploadthing.ts" }}
```ts {{ title: "app/routes/api.uploadthing.ts" }}
import { createRouteHandler } from "uploadthing/remix";

const uploadRouter = {
Expand All @@ -117,16 +117,16 @@ export const { action, loader } = createRouteHandler({
## Create The UploadThing Components

```ts {{ title: "src/utils/uploadthing.ts" }}
```ts {{ title: "app/utils/uploadthing.ts" }}
import {
generateUploadButton,
generateUploadDropzone,
} from "@uploadthing/react";

import type { UploadRouter } from "~/routes/api.uploadthing";

export const UploadButton = generateUploadButton<OurFileRouter>();
export const UploadDropzone = generateUploadDropzone<OurFileRouter>();
export const UploadButton = generateUploadButton<UploadRouter>();
export const UploadDropzone = generateUploadDropzone<UploadRouter>();
```

### Add UploadThing's Styles
Expand Down
Loading

0 comments on commit 37a73ff

Please sign in to comment.