citizenos / ep_image_upload

Add images to etherpad and upload them to Amazon S3
Other
9 stars 16 forks source link

TypeError of class constructor URL #26

Closed rasos closed 3 years ago

rasos commented 3 years ago

We see this at each upload on a fresh EP, which causes it to stop:

[2021-02-04 09:27:09.385] [ERROR] console - TypeError: Class constructor URL cannot be invoked without 'new'
    at Busboy.<anonymous> (/opt/etherpad-lite/node_modules/ep_image_upload/index.js:153:28)
    at Busboy.emit (node:events:378:20)
    at Busboy.EventEmitter.emit (node:domain:470:12)
    at Busboy.emit (/opt/etherpad-lite/node_modules/busboy/lib/main.js:38:33)
    at PartStream.<anonymous> (/opt/etherpad-lite/node_modules/busboy/lib/types/multipart.js:213:13)
    at PartStream.emit (node:events:378:20)
    at PartStream.EventEmitter.emit (node:domain:470:12)
    at HeaderParser.<anonymous> (/opt/etherpad-lite/node_modules/dicer/lib/Dicer.js:51:16)
    at HeaderParser.emit (node:events:378:20)
    at HeaderParser.EventEmitter.emit (node:domain:470:12)
    at HeaderParser._finish (/opt/etherpad-lite/node_modules/dicer/lib/HeaderParser.js:68:8)
    at SBMH.<anonymous> (/opt/etherpad-lite/node_modules/dicer/lib/HeaderParser.js:40:12)
    at SBMH.emit (node:events:378:20)
    at SBMH.EventEmitter.emit (node:domain:470:12)
    at SBMH._sbmh_feed (/opt/etherpad-lite/node_modules/streamsearch/lib/sbmh.js:159:14)
    at SBMH.push (/opt/etherpad-lite/node_modules/streamsearch/lib/sbmh.js:56:14)

in settings.json:

"ep_image_upload":{
    "storage":{
      "type": "local",
      "baseFolder": "/mnt/data/etherpad-lite/upload",
      "baseURL": "https://padurl.net/up/"
    },
    "fileTypes": ["jpeg","jpg","bmp","gif","png"],
    "maxFileSize": 5000000
  },
dliw commented 3 years ago

See #25

rasos commented 3 years ago

Confirmed that https://github.com/citizenos/ep_image_upload/pull/25 fixes the issue.

JohnMcLear commented 3 years ago

Also addressed in #27 :)

JohnMcLear commented 3 years ago

resolved in #27