premieroctet / next-admin

▲ Full-featured admin for Next.js and Prisma
https://next-admin.js.org
MIT License
321 stars 19 forks source link

[FEATURE] - When uploading, include record information #477

Open huinalam opened 1 month ago

huinalam commented 1 month ago

Summary

When uploading, include record information, such as the resource ID. This is because it can be utilized to generate a URL when uploading a file.

Basic Example

upload: async (buffer, infos, context) => {
  console.log(context.resourceId);
  return "https://raw.githubusercontent.com/premieroctet/next-admin/33fcd755a34f1ec5ad53ca8e293029528af814ca/apps/example/public/assets/logo.svg";
},

Drawbacks

No response

Unresolved questions

No response