Feature request: ImageUploaded webhook

A reasonable flow with images may look like this:

  1. A worker generates an upload url for a specific user
    1.1. It stores in ‘PendingUploads’ kv store the uploadId as key, and the context of the request as value. E.g. the user that requested it, or to which account it belongs
    1.2. It sends back the uploadUrl to the client
  2. If and when the upload is completed by the client a webhook is sent to another worker
    2.1. when the webhook is received the worker fetches the pending upload context from kv
    2.2. Now it can update a DB with a link to the uploaded image

Without this, there will be many zombie-urls stored in my db because I have no way to know if the upload was ever completed

Anyone has a way to deal with this?

What are you using for your backend? Are you purely using workers? I have CF Images functioning well, but I have my backend post, wait for a response, and handle that response.

You mean that you upload images from your backend?
I think the whole idea of disposable upload links is that you can send them to your client and the client can upload directly, without going through your backend. Only the getUploadUrl goes through your backend

To your question - I’m using workers as backend.

Thanks for the reply.


This topic was automatically closed after 15 days. New replies are no longer allowed.