Uploads via createUpload is crazy slow

@tim1, I just answered the other thread, but it’s still bad news there :frowning: Yes, there was a bug, and even after fixing that bug, it still won’t run in a Node environment unless you polyfill XMLHttpRequest.

What is the underlying use case here? Am I understanding correctly that it’s going: User → Serverless Func → Cloudinary (and skipping Dato now)?

Is the idea just so that the frontend (i.e. your users) can directly upload images to Dato? If so, maybe this other similar thread can help? Image Upload from user-facing webpage to DatoCMS, without revealing API key (edited title)

In that case, we did it like this:

  • Get permissions to upload a file via an API route or serverless function (so that your end-users don’t see your API keys)
  • The user’s browser directly sends the file to AWS
  • Another route handler tells DatoCMS to finalize the upload

So there is no long-lived connection here except between the user’s browser and AWS directly, which seems to work OK.

Would that work for you, or is your use case different enough?