MCPcopy
hub / github.com/pingdotgg/uploadthing / GenerateTypedHelpersOptions

Interface GenerateTypedHelpersOptions

packages/react/src/types.ts:20–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18} from "uploadthing/types";
19
20export interface GenerateTypedHelpersOptions {
21 /**
22 * URL to the UploadThing API endpoint
23 * @example "/api/uploadthing"
24 * @example "https://www.example.com/api/uploadthing"
25 *
26 * If relative, host will be inferred from either the `VERCEL_URL` environment variable or `window.location.origin`
27 *
28 * @default (VERCEL_URL ?? window.location.origin) + "/api/uploadthing"
29 */
30 url?: string | URL;
31 /**
32 * Provide a custom fetch implementation.
33 * @default `globalThis.fetch`
34 * @example
35 * ```ts
36 * fetch: (input, init) => {
37 * if (input.toString().startsWith(MY_SERVER_URL)) {
38 * // Include cookies in the request to your API
39 * return fetch(input, {
40 * ...init,
41 * credentials: "include",
42 * });
43 * }
44 *
45 * return fetch(input, init);
46 * }
47 * ```
48 */
49 fetch?: FetchEsque | undefined;
50}
51
52export type UseUploadthingProps<
53 TFileRoute extends AnyFileRoute,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected