Open juliusmarminge opened 4 months ago
https://vercel.com/docs/functions/functions-api-reference#waituntil
I think itβd be useful to have this exposed in the onUploadComplete callback, since you could do some stuff non-blocking (such as delete an old image for example) without blocking server polling response times
.onUploadComplete(async ({ file, metadata, ctx }) => { await db.update(...) // delete old file non-blocking ctx.waitUntil(() => { utapi.deleteFile(metadata.oldFileKey) }) })
No response
I can work in this
Describe the feature you'd like to request
https://vercel.com/docs/functions/functions-api-reference#waituntil
I think itβd be useful to have this exposed in the onUploadComplete callback, since you could do some stuff non-blocking (such as delete an old image for example) without blocking server polling response times
Describe the solution you'd like to see
Additional information
No response
π¨βπ§βπ¦ Contributing