const trpc = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: 'http://localhost:3000'
}),
],
virtual: {
upload: virtualProdedure
.input({ file: z.any() })
.mutation((input) => {
// Call whatever you want here
return {
'url': 'https://example.com'
}
})
}
})
trpc.upload.mutate({ file: new File() })
const trpc = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: 'http://localhost:3000'
}),
],
virtual: {
upload: virtualProdedure
.input({ file: z.any() })
.mutation((input) => {
// Call whatever you want here
return {
'url': 'https://example.com'
}
})
}
})
trpc.upload.mutate({ file: new File() })