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

Add custom endpoint with App router #171

Open
thomasmorice opened this issue Oct 30, 2023 · 4 comments
Open

Add custom endpoint with App router #171

thomasmorice opened this issue Oct 30, 2023 · 4 comments

Comments

@thomasmorice
Copy link

Currently using the AppRouter configuration
export { POST } from "next-s3-upload/route";
There is no way to add a custom endpoint

@ryanto
Copy link
Owner

ryanto commented Oct 30, 2023

does this work?

import { POST as route } from "next-s3-upload/route";

export const POST = route.configure({
  // ...
});

@thomasmorice
Copy link
Author

I get an error: hostname: sts.fra1.amazonaws.com,
Seems like the hostname is not being updated by the endpoint passed as a parameter within route.configure({...})

@ryanto
Copy link
Owner

ryanto commented Oct 31, 2023

Can you share your code?

@tonyng3101
Copy link

tonyng3101 commented Jul 25, 2024

This answer is very late but I still want to share to who need it and thank to your answer @ryanto

import { POST as route } from 'next-s3-upload/route';

const POST = route.configure({
   // your configuration
});

export { POST };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants