docu-notion icon indicating copy to clipboard operation
docu-notion copied to clipboard

docu-notion doesn't handle images embedded as [data:image...]

Open andrew-polk opened this issue 1 year ago • 0 comments

I'm not sure we need/want to fix this. (But I want to document it.) Even Notion's own UI doesn't show the images or give any way to modify or delete them; but at least it doesn't crash. If you manage to get one of these into your Notion page (through some kind of import), Notion will export it; then docu-notion will crash with

/home/runner/work/.../node_modules/node-fetch/lib/index.js:1331
  		throw new TypeError('Only HTTP(S) protocols are supported');
          ^
  TypeError: Only HTTP(S) protocols are supported
      at getNodeRequestOptions (/home/runner/work/.../node_modules/node-fetch/lib/index.js:1331:9)
      at /home/runner/work/.../node_modules/node-fetch/lib/index.js:1432:19
      at new Promise (<anonymous>)
      at fetch (/home/runner/work/.../node_modules/node-fetch/lib/index.js:1429:9)
      at /home/runner/work/.../node_modules/docu-notion/dist/images.js:134:57
      at Generator.next (<anonymous>)
      at /home/runner/work/.../node_modules/docu-notion/dist/images.js:31:[71](https://github.com/sillsdev/.../actions/runs/4982783840/jobs/8918938268#step:5:73)
      at new Promise (<anonymous>)
      at __awaiter (/home/runner/work/.../node_modules/docu-notion/dist/images.js:27:12)
      at readPrimaryImage (/home/runner/work/.../node_modules/docu-notion/dist/images.js:133:12)

andrew-polk avatar May 15 '23 19:05 andrew-polk