kintone/js-sdk

Support a stream on uploadFile in browsers

ueokande opened this issue · 1 comments

Package

  • @kintone/rest-api-client 3.1.11

Why

https://github.com/kintone/js-sdk/blob/master/packages/rest-api-client/docs/file.md#uploadFile

Stream is only available in Node.js environment.

Uploading files from local filesystem and stream is supported is only available in Node.js. This can cause increase heap memory usage.

What

Most modern browsers support WritableStream. This is helpful to reduce memory usage in browsers.

In Node.js, WritableStream is experimental (stability 1).
Also, we have to drop Node 14.x support for supporting WritableStream on Node.js.
https://developer.mozilla.org/ja/docs/Web/API/Streams_API#writablestream_2