TimMikeladze / next-upload

🗃️ Turn-key solution for signed & secure file-uploads to an S3 compliant storage service such as R2, AWS, or Minio. Built for Next.js. Generates signed URLs for uploading files directly to your storage service and optionally integrates with a database to store additional metadata about your files.
MIT License
85 stars 4 forks source link

Upload files to a post policy url directly from the server #7

Open TimMikeladze opened 10 months ago

TimMikeladze commented 10 months ago

next-upload/client/upload only works in the browser, but sometimes you may want to upload a buffer from nodejs.

8times4 commented 2 months ago

Hey Tim, would this be also required in order for tRPC to work with next-upload?

TimMikeladze commented 2 months ago

I'm not too familiar with how tRPC works. If the you're talking about transmitting a file from a trpc client to a trpc server, then the answer is no, as that's opposite of how next-upload is built to work.

By the way for this issue, I'm 99% sure it already works, it just needs to be documented.

8times4 commented 2 months ago

Basically I was just trying to put the upload function behind a mutation endpoint within trpc, so that the upload request itself is hidden from the client as the client just calls uploadImage with the files, but I guess that’s not feasible then. Thank you though :)