citizenos / ep_image_upload Goto Github PK
View Code? Open in Web Editor NEWAdd images to etherpad and upload them to Amazon S3
License: Other
Add images to etherpad and upload them to Amazon S3
License: Other
Hey out there,
have you already considered providing the option to resize images as @JohnMcLear did on ep_copy_paste_images?
Here are some infos about that
JohnMcLear/ep_previewimages#14 (comment)
Thank you very much for your engagement! Best wishes, Flo
button works, and I can select an image, but upload fails, image does not appear (base64 method):
TypeError: Cannot convert undefined or null to object
at Function.keys ()
at Object.exports.clientVars [as hook_fn] (C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_image_upload\static\js\serverHooks.js:36:23)
at normalizedhook (C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\static\js\pluginfw\hooks.js:15:27)
at hookCallWrapper (C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\static\js\pluginfw\hooks.js:21:14)
at C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\static\js\pluginfw\hooks.js:88:7
at C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\node_modules\async\lib\async.js:249:17
at C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\node_modules\async\lib\async.js:125:13
at Array.forEach ()
at _each (C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\node_modules\async\lib\async.js:46:24)
at async.each (C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\node_modules\async\lib\async.js:124:9)
at _asyncMap (C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\node_modules\async\lib\async.js:248:13)
at Object.map (C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\node_modules\async\lib\async.js:219:23)
at Object.exports.aCallAll (C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\static\js\pluginfw\hooks.js:85:9)
at C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\node\handler\PadMessageHandler.js:1346:15
at C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\node_modules\async\lib\async.js:610:21
at C:\Users\Florian\Downloads\etherpad-lite-win-1.7.5-6a3e4c69b8\node_modules\ep_etherpad-lite\node_modules\async\lib\async.js:249:17
Error message popup looks a little weird. Probably needs some style/text update.
Probably should use gritter-container. Example from src code:
$.gritter.add({ title: 'Error', text: html10n.get('pad.noCookie'), sticky: true, class_name: 'error', });
Edited, bold notes by JM
Motivated by the issue and @JohnMcLear answer it wanted to write an report!
Still left to do:
Details
OS: Win 8.1
Browser: Firefox 75.0
Testpad: https://board.net/ (I suppose they have ep_copy_paste_images as well as ep_image_upload installed)
Drag and Drop inside Pad
Works
(image is copied so we have it twice) - confirmed, will fix todaydoesn't work (neither left nor right nor in beetween)
** - it puts it on the prior line**Copy to clipboard/ Paste (using control c / v) inside Pad
doesn't work
doesn't work
doesn't work
- confirmed, due to #8Cut to clipboard/ Paste (using control x / v)
doesn't work
doesn't work
doesn't work
Image appearance
correct
correct
Alignment
no statement possible
Resize
yes, using tab (resize smaller) or shift+tab (resize larger until original size is reached) when the cursor is left of the image
** I love this hack but I don't think it's suitable as it's not a clear UX, still, I can't fault you 👯 **Browser Resize
yes
Image can never be selected by tipping it, but it can be selected by dragging the cursor over several lines. But then ctrl+c/ctrl+x works to move it for example to libre office (so it's in the clipboard), but when it's copied to another place in the pad it disappears)
- confirmed, due to #8works with tab/shift+tab like described above
Keyboard
yes, but when we have 2 images and the caret is in beetween these two, delete doesn't delete the respective line but rather the image below
- confirmed, due to #8not possible, because caret/cursor always jumps to the left
- confirmed, due to #8yes
Further observations
I have two questions related to the plug-in
When the image is uploaded through the plug-in to s3
Other file types than images are not shown as download link.
As the sister plugin ep_fileupload has an unresolved cross origin issue redhog/ep_fileupload#24 and is un-usable, it would be nice to extend the functionality by showing a download link for non-image MIME types.
"fileTypes": ["jpeg","jpg","bmp","gif","png","pdf","mp4","ogg","mp3","webm","wav","md","rtf","tex","txt","doc","docx","xls","xlsx","pptx","ods","odt","odp","html","pages","py","zip"],
I've recently upgraded to ep_image_upload
from the ep_copy_paste_images
plugin, and looks like images that have been added to a pad using the old plugin are not displayed correctly. The image data is still there and it can be fixed manually.
The exported html includes the complete img
tag as src
like so
<img src="<img src="data:image/jpeg;base64 ... ">">
After enabling ep_image_upload
in Etherpad 1.8.4, The image icon appears in the toolbar, but pressing it doesn't do anything.
The JS console shows lots of errors like this (but for various different modules):
Failed to load 'ep_image_upload/static/js/toolbar' for 'ep_image_upload/ep_image_upload/client_hooks/postToolbarInit': Error: The module at "ep_image_upload/static/js/toolbar" does not exist. ace2_common.js:36:445
Hello
I have an issue with ab other plugin (to remove pads from admin UI)
ep_adminpads2
crash when removing a pad ... because he try to do something with the upload folder I setting up to use ep_image_upload
(in local)
Maybe ep_image_upload is declaring something that dont exists ?
Or automatically do a symbolic linking to every pads (even if no image upload) ?
Thanks, very cool plugin
If "set to write to filesystem" is enabled ctrl v of an image should create a new file not write base64 to the pad.
I'd guess we'd need to catch paste events and if it includes an image do an upload to the filesystem instead of writing the contents to the pad.
Images do not get deleted when using storage type local. This results in a BIG images folder on my instance (many users, many pads, many images).
Since a plugin update today to [email protected] and [email protected] we get on a EP 1.8.7 at each upload:
[2021-02-14 23:19:48.971] [ERROR] console - TypeError [ERR_INVALID_URL]: Invalid URL: testing1/ba1e83de-1b80-427a-9ce8-2c6780076.jpeg
at new NodeError (node:internal/errors:329:5)
at onParseError (node:internal/url:282:9)
at new URL (node:internal/url:358:5)
at new URL (node:internal/url:355:22)
at Busboy.<anonymous> (/opt/etherpad-lite/node_modules/ep_image_upload/index.js:132:24)
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)
[2021-02-14 23:19:48.971] [INFO] console - Stopping Etherpad...
settings.json
includes:
"ep_image_upload": {
"storage": {
"type": "local",
"baseFolder": "/mnt/data/etherpad-lite/upload",
"baseURL": "https://ourpad.net/up/"
},
"fileTypes": ["jpeg","jpg","bmp","gif","png"],
"maxFileSize": 5000000
},
This has worked fine before. Uninstalling the plugin for now, as it causes exceptions.
Amazing plugin. The only thing missing is to drag a file from the Windows Explorer into the Etherpad document, and then having the ep_image_upload plugin doing the upload (base64 conversion).
Could this be implemented?
Failed to load 'ep_markdownify/static/js/index' for 'ep_markdownify/main/client_hooks/aceEditorCSS': Error: The module at "ep_etherpad-lite/static/js/security.js" does not exist.
Failed to load 'ep_markdownify/static/js/index:aceGetFilterStack' for 'ep_markdownify/main/client_hooks/aceGetFilterStack': Error: The module at "ep_etherpad-lite/static/js/security.js" does not exist.
Failed to load 'ep_markdownify/static/js/index:aceCreateDomLine' for 'ep_markdownify/main/client_hooks/aceCreateDomLine': Error: The module at "ep_etherpad-lite/static/js/security.js" does not exist.
This results in a spinner of the left side but none of the image functionality works. Etherpad-lite 1.8.0 running inside the official etherpad docker image. settings.json had been updated with proper settings.
Hi,
this is not a bug in this package, but I don't really know,
where the "deprecation" warning of ep_copy_paste_images
is generated.
Anyway, trying to npm-install the plugin ep_copy_paste_images said,
I should use ep_upload_images instead, which does not exist.
Only on the website of copy_paste_images I found the correct link to here.
Go ahead an close this issue, if you think this is too minor to be hunted down.
Cheers
When I installed ep_ copy_ paste_ images, use ep_ image_ upload failed to upload due to wrong upload image
Re step
1、installed ep_ image_ upload
2、installed ep_ copy_ paste_ images
3、use ep_ image_ upload failed to upload
etherpad 1.9.7, node 21.7.1
Attempting to install this plugin on an Etherpad lite 1.9.7 instance, however I am getting the error message TypeError: clientVars.ep_image_upload is undefined
whenever I try uploading an image.
I DO have the following in my settings.json
:
"ep_image_upload": {
"fileTypes": ["jpeg", "jpg", "bmp", "gif", "png"],
"maxFileSize": 5000000
}
And on the terminal where I am running the etherpad server I see:
[2024-03-13T12:59:16.456] [WARN] client - TypeError: clientVars.ep_image_upload
is undefined -- {
errorId: 'eAJC4Fkkelumyyls0tm1',
type: 'Uncaught exception',
msg: 'TypeError: clientVars.ep_image_upload is undefined',
url: 'http://192.168.12.80:9001/p/quartus-notes',
source: 'http://192.168.12.80:9001/static/js/require-kernel.js?v=29e99f08 line 1 > Function',
linenumber: 3,
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:123.0) Gecko/20100101 Firefox/123.0',
stack: '_isValid@http://192.168.12.80:9001/static/js/require-kernel.js?v=29e99f08 line 1 > Function:3:303\n' +
'(module ep_image_upload/static/js/toolbar.js)/exports.postToolbarInit/</<@http://192.168.12.80:9001/static/js/require-kernel.js?v=29e99f08 line 1 > Function:3:1429\n' +
'dispatch@http://192.168.12.80:9001/javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define&v=29e99f08:18:39815\n' +
'(module ep_etherpad-lite/static/js/vendors/jquery.js)/</add/v.handle@http:/
/192.168.12.80:9001/javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?ca
llback=require.define&v=29e99f08:18:37806\n'
}
Yes, I have checked to make sure everything is spelled correctly, that I am NOT using smart quotes, etc.
I don't have any problems with any other plugins that store their settings in settings.json
Not sure what the problem is, I can't think of anything else that could be at fault.
I would like to use the plugin with my docker etherpad. I created a volume /var/www/images where i want to store my images. But the container runs in a docker network. I use the php EtherpadLiteClient https://github.com/0x46616c6b/etherpad-lite-client
The plugin makes a POST to /p/g.Ovnjr54VGyJC271h$0/pluginfw/ep_image_upload/upload
which is ending in a 404 because the route does not exist, because the container does not exposes this routes throu the docker network.
Do I have to add a proxy to /p/g.Ovnjr54VGyJC271h$0/pluginfw/ep_image_upload/upload
to my php server, with talks to the docker container?
Reproduce
This USED TO BE a valid configuration:
"toolbar": {
"left": [
....
[
"fontColor",
"addFootNote",
"addImage"
]
],
But, as toolbar action addImage
has been lost, this throws an error when toolbar is loaded:
TypeError: /home/m/dev/etherpad-lite-heroku/etherpad-lite/node_modules/ep_etherpad-lite/templates/pad.html:70
68| <ul class="menu_left" role="toolbar">
69| <% e.begin_block("editbarMenuLeft"); %>
>> 70| <%- toolbar.menu(settings.toolbar.left, isReadOnly, 'left', 'pad') %>
71| <% e.end_block(); %>
72| </ul>
73| <ul class="menu_right" role="toolbar">
Cannot create property 'grouping' on boolean 'false'
at ButtonsGroup.render (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node/utils/toolbar.js:65:35)
at _.map (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node/utils/toolbar.js:272:76)
at Function.map (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node_modules/underscore/underscore.js:1329:24)
at Object.menu (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node/utils/toolbar.js:272:22)
at eval (eval at compile (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node_modules/ejs/lib/ejs.js:662:12), <anonymous>:69:25)
at pad (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node_modules/ejs/lib/ejs.js:692:17)
at Object.exports.require (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node/eejs/index.js:94:15)
at args.app.get (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node/hooks/express/specialpages.js:57:19)
at Layer.handle [as handle_request] (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node_modules/express/lib/router/layer.js:95:5)
at next (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node_modules/express/lib/router/layer.js:95:5)
at /home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node_modules/express/lib/router/index.js:281:22
at param (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node_modules/express/lib/router/index.js:354:14)
at paramCallback (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node_modules/express/lib/router/index.js:401:21)
at args.app.param (/home/m/dev/etherpad-lite-heroku/etherpad-lite/src/node/hooks/express/padurlsanitize.js:18:7)
Cause
Hi
I cant get the alignement working with the plugin ep_align ?
It seems it was working before ?
Does the image tag can be in the left, center or right tag ?
Thanx for your help
Looks like the image_upload
and copy_paste_images
plugins stopped working somewhere between etherpad versions 1.8.3 and 1.8.4.
Pads with images (working on 1.8.3 and HEAD as of May 13th) will get stuck at "Loading..." or give an error after updating to 1.8.4...
console - (node:25175) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at Object.exports.clientVars [as hook_fn] (/var/www/etherpad/node_modules/ep_image_upload/static/js/serverHooks.js:36:23)
at normalizedhook (/var/www/etherpad/src/static/js/pluginfw/hooks.js:15:27)
at hookCallWrapper (/var/www/etherpad/src/static/js/pluginfw/hooks.js:21:14)
at /var/www/etherpad/src/static/js/pluginfw/hooks.js:88:7
at /var/www/etherpad/src/node_modules/async/lib/async.js:249:17
at /var/www/etherpad/src/node_modules/async/lib/async.js:125:13
at Array.forEach (<anonymous>)
at _each (/var/www/etherpad/src/node_modules/async/lib/async.js:46:24)
at async.each (/var/www/etherpad/src/node_modules/async/lib/async.js:124:9)
at _asyncMap (/var/www/etherpad/src/node_modules/async/lib/async.js:248:13)
at Object.map (/var/www/etherpad/src/node_modules/async/lib/async.js:219:23)
at aCallAll (/var/www/etherpad/src/static/js/pluginfw/hooks.js:85:9)
at /var/www/etherpad/src/static/js/pluginfw/hooks.js:100:7
at new Promise (<anonymous>)
at Object.exports.aCallAll (/var/www/etherpad/src/static/js/pluginfw/hooks.js:99:12)
at handleClientReady (/var/www/etherpad/src/node/handler/PadMessageHandler.js:1142:32)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
console - (node:25175) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8)
...also submitted here
the cursor always moves to the left of the image while clicking the image.
In order to find what makes the cursor move, I find the code that makes the cursor change in etherpad/src/static/js/ace2_inner.js: 4013
the start.offset/ end. offset always be zero while clicking the image
if (selection) {
isCollapsed = (selection.startPoint.node === selection.endPoint.node && selection.startPoint.index === selection.endPoint.index);
var start = pointToRangeBound(selection.startPoint);
var end = pointToRangeBound(selection.endPoint);
if ((!isCollapsed) && selection.focusAtStart && browserSelection.collapse && browserSelection.extend) {
// can handle "backwards"-oriented selection, shift-arrow-keys move start
// of selection
browserSelection.collapse(end.container, end.offset);
// console.trace();
// console.log(htmlPrettyEscape(rep.alltext));
// console.log("%o %o", rep.selStart, rep.selEnd);
// console.log("%o %d", start.container, start.offset);
browserSelection.extend(start.container, start.offset);
} else {
var range = doc.createRange();
range.setStart(start.container, start.offset);
range.setEnd(end.container, end.offset);
browserSelection.removeAllRanges();
browserSelection.addRange(range);
}
}
When I open a read-only link the Icon is still there and clickable. I can even write something and insert the picture. It is shown inside the document, but gladly only locally. It is not shown to other authors and visitors.
But this behaviour can be confusing to visitors.
Overview
Please add support for the uploaded files to be embedded in Base64.
Cons of external references:
Pros of the external references:
TODO:
Hello! I love this plugin, by the way.
I just got Etherpad set up and running in Azure. I mention this becausetThere were a number of issues that had to be addressed in Etherpad-Lite to support Azure, so the hosting environment might introduce some issues for the plugin as well.
Image uploading via copy/paste, drag/drop and the upload button seem to be working fine. But the line number spacing gets weird.
In this image, I added a CSS rule via the Developer Tools console to resize the images to 25%. You can see that the line numbers resize reasonably.
However, when I remove my CSS change, the spacing between the line numbers increases, but it seems to grow independent of the document context frame, and now I can't scroll down to view the rest of the document.
There are no client or server side errors.
If I disable line numbers then the extra space at the bottom goes away, but I can't scroll down to see the rest of the document.
I can scroll with the cursor, but there are no scroll bars. I added a bunch of text at the top of the document (to push the images off screen) and this did not cause scrollbars to appear.
Please let me know if there's any additional information that I could provide!
The code installed from NPM is different than the code in this repo.
Is there a reason for this?
Is there a way to export the images in the documents?
Hi, Thank you for this awesome package. I'd like to know if there is any way we can upload/retrieve images on Private S3 bucket. Thanks
Any idea how I can import images to a pad using the sethtml api from Etherpad?
Hello,
Trying to migrate/update an installation using the ep_copy_images plugin, I get the following error for pages that already have images from the old install.
EP + ep_image_upload seem to work fine. But it crashes for my legacy pages. Any suggestions?
This is running on top of RockyLinux8 + NodeJS16 + Postgresql
Thanks!
type: 'Unhandled Promise rejection',
msg: 'TypeError: /src\s*=\s*"([^\\s]+\/\/[^/]+.\/[^\\s]+\.\w*)/gi.exec(...) is null',
url: 'https:///p/oldPage',
source: 'https:///static/js/require-kernel.js?v=12388c46 line 1 > Function',
linenumber: 3,
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0',
stack: '(module ep_image_upload/static/js/clientHooks.js)/exports.aceAttribsToClasses@https:///static/js/require-kernel.js?v=12388c46 line 1 > Function:3:480\n' +
'callHookFnSync@https:///javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define&v=12388c46:43:1543\n' +
'(module ep_etherpad-lite/static/js/pluginfw/hooks.js)/exports.callAll/<@https:///javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define&v=12388c46:43:2259\n' +
'(module ep_etherpad-lite/static/js/pluginfw/hooks.js)/exports.callAll@https:///javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define&v=12388c46:43:2236\n' +
'f/g</<@https:///static/js/require-kernel.js?v=12388c46 line 1 > Function:19:1411\n' +
Hello,
could you specify under which licence is ep_image_upload
published? I'm interested to adapt it (and contribute back) but I don't know which rights are attached to the project.
Thanks!
Hi,
thanks for ep_image_upload! it's working amazingly fine.
I would like to know what is the best solution to implement an image cropping into the fileupload.
I consider using Croppie
To be honest I have not a deep understanding of how the Etherpad editor works.
By looking at your code, I don't see any custom dom events/hooks where I can put in a way my custom code (with a custom etherpad plugin) or even if it's a good practice to extend a plugin by another plugin.
So I though I can come with a PR where:
ep_image_upload
config (so we can support some options of the Croppie)package.jon
What are your insights on this?
Thanks in advance
After I install this plugin today, etherpad shutdowns everytime I try to open a pad, existed one or new one. But I can still access other url (e.g ip_addr:port/admin). The problem gone after the plugin uninstall.
Error log belows
[2019-02-21 03:09:42.831] [INFO] access - [CREATE] Pad "padid": Client G1IokDGNjrTTubbmAAAD with IP "ip_address" created the pad
[2019-02-21 03:09:42.832] [ERROR] console - TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at Object.exports.clientVars [as hook_fn] (/home/etherpad/etherpad-lite/node_modules/ep_image_upload/static/js/serverHooks.js:34:23)
at normalizedhook (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:15:27)
at hookCallWrapper (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:21:14)
at /home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:88:7
at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:249:17
at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:125:13
at Array.forEach (<anonymous>)
at _each (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:46:24)
at async.each (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:124:9)
at _asyncMap (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:248:13)
at Object.map (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:219:23)
at Object.exports.aCallAll (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:85:9)
at /home/etherpad/etherpad-lite/src/node/handler/PadMessageHandler.js:1346:15
at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:610:21
at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:249:17
at iterate (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:149:13)
at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:160:25
at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:251:21
at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:615:34
at /home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:254:17
at done (/home/etherpad/etherpad-lite/src/node_modules/async/lib/async.js:135:19)
[2019-02-21 03:09:42.833] [INFO] console - graceful shutdown...
[2019-02-21 03:09:42.875] [INFO] ueberDB - Flushed 5 values
[2019-02-21 03:09:42.975] [INFO] console - db sucessfully closed.
On a fresh etherpad install this plugin doesn't work.
I did the typical install:
git clone --branch master https://github.com/ether/etherpad-lite.git
cd etherpad-lite
./bin/run.sh --root
and then I installed ep_image_upload from admin page.
this is the error I'm receiving:
[2024-04-05T20:10:53.182] [ERROR] settings - Failed to load hook function "/opt/etherpad-lite-git-04042024/src/plugin_packages/ep_image_upload/index:clientVars" for plugin "ep_image_upload" part "ep_image_upload" hook set "hooks" hook "clientVars": Error: Cannot find module 'graceful-fs'
please, don't hesitate to ask for further info.
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
npm -v
10.5.1
We have been promoting not always uploading images but also just to paste an image URL. This saves disc space and is the preferred method if copyrights are not cleared.
However, the ep_previewimage
plugin is not intended to be used with ep_image_upload
anymore
https://github.com/JohnMcLear/ep_previewimages/blob/master/README.md
So is it intended that the function will be integrated in ep_image_upload
, showing images for which we only have an external image URl in the pad? Currently, no image is shown, if I add an image URl into the pad.
Add functionality to scale images inside document. Best way would be, to add a scale handler that enables users to scale images to their preferred size inside document
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
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.