Hi @tim1,
I鈥檓 very, very sorry again for the long delay on this!
You were right: There was indeed a bug in our library: Fix impossible blob name check by arcataroger 路 Pull Request #19 路 datocms/js-rest-api-clients 路 GitHub. Sorry about that! I have submitted a PR to hopefully fix it and properly allow blob uploads.
Unfortunately, even after that fix, cma-client-browser
still won鈥檛 on Node.js without a polyfill for XmlHttpRequest
, which is used later on in the upload process. You can of course fork that repo and apply that polyfill yourself if you鈥檇 like, or alternatively, it might be easier to just send the raw HTTP requests:
- Official documentation here
- Or you can see a similar situation in this other thread: Image Upload from user-facing webpage to DatoCMS, without revealing API key (edited title) - #5 by roger (and its associated repo)