Giter Site home page Giter Site logo

ep_fileupload's Introduction

ep_fileupload

File upload plugin for Etherpad Lite. A user can upload a file, and a link to the uploaded file is automatically inserted in the pad.

ep_fileupload's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ep_fileupload's Issues

problem when fileupload & adminpads both installed

The plugins ep_fileupload and ep_adminpads can't be both installed.

If not, there is a Js error when going on the "Manage pads" page
(fileupload works).

TypeError: el is undefined
el.addEventListener(type, fn, false);

ajaxupload.js (ligne 37)

I can't say who steps on other's foot, but they are 2 great plugins and that would be very nice to have them both working hands in hands :)

from accessing a cross-origin frame

Hi,
When I am trying to upload an image, I am getting an error. also, I have attached the screenshot.

Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
ajaxupload.js:1 Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://localhost:9999" from accessing a cross-origin frame.
at HTMLIFrameElement. (http://localhost:9999/static/plugins/ep_fileupload/static/js/ajaxupload.js:1:4603)
localhost/:1 Failed to load resource: the server responded with a status of 405 (Method Not Allowed)

upload

Uncaught SecurityError

Upload doesn't work. Most recent git version aka ep 1.6.1

[2017-07-05 21:01:08.482] [WARN] client - Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "https://pad.net" from accessing a cross-origin frame. -- { errorId: 'icFcYaBagbdrh6Lcg0tX',
  msg: 'Uncaught SecurityError: Failed to read the \'contentDocument\' property from \'HTMLIFrameElement\': Blocked a frame with origin "https://pad.net" from accessing a cross-origin frame.',
  url: 'https://pad.net/p/test',
  linenumber: 1,
  userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36' }

EDIT 08-July-17:
This seems to be related to the usage of a reverse proxy in-front of the pad. It is working in my virtual machine. Needs to be fixed through code. (i have seen your commit to fix it, but it doesn't work for me, proxy setup from etherpad wiki)

EDIT 14-July-17:
Seems like a reverse proxy / security options issue... The development stopped here, too, right?

EDIT 20-Oct-17:
This explains the issue very well... ajaxupload was not made for this: https://stackoverflow.com/questions/25098021/securityerror-blocked-a-frame-with-origin-from-accessing-a-cross-origin-frame
Maybe https://fineuploader.com/ can be used instead (successor)

file upload failed

Hi
with EP 1.5.7 and ep_file_upload 0.0.9 a day the plugin failed to work.

In EP log file at file uploading I can read:

[2016-02-21 22:41:15.608] [WARN] client - Error: Permission denied to access property "document" -- { errorId: 'bVmOML9kAUQObioyna28',
  msg: 'Error: Permission denied to access property "document"',
  url: 'http://pad.example.com/p/secret_pad',
  linenumber: 454,
  userAgent: 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0' }

Error uploading image with ep_fileupload

When uploading an image, it will briefly flash on screen, disconnect, and proceed to give the following error on reconnecting.

An error occured
The error was reported with the following id: 'M0DzV4JVoA1DeAT6wjzr'

Please send this error message to us:
'ErrorId: M0DzV4JVoA1DeAT6wjzr
URL: http://localhost:9001/p/test1
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.29 Safari/537.36
Uncaught TypeError: Cannot call method 'setChannelState' of null in http://localhost:9001/javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define at line 3'

Does not generate https links

From controllers/fileUpload.js:

// FIXME: Calculate URL for real, with path prefix and with https handling
res.send(eejs.require("ep_fileupload/templates/fileUploaded.ejs", {upload: 'http://' + req.headers.host + "/up/" + name}, module));

So you already know of the problem :)

I fixed it temporarily by replacing http:// with https:// as my etherpad lite installation is only available via https.

Error on file uploaded

When I upload a file I see:

<script type="text/javascript">
//<![CDATA[
try{(function(a){var b="
http://",c="medioescolar.ml",d="/cdn-cgi/cl/",e="img.gif",f=new a;f.src=[b,c,d,e].join("")})(Image)}catch(e){}
//]]>
</script>

Accessing old uploaded files cause error

We've done an upgrade to latest EP 1.5.6 and reinstalled all plugins. When you try to access a file, which has been uploaded before the update, the file is not accessible anymore.
The user gets a {"error":"Sorry, something bad happened!"}
Logfile: [2015-07-11 15:19:37.102] [ERROR] console - Error: ENOENT, stat '/opt/etherpad-lite/node_modules/ep_fileupload/upload/6a7b1b3bb79165f900ceb749c8d3889f.jpg'
at Error (native)
Has it something to do with the newly introduced relative addressing of files in ep_fileupload?
Here you can see the different behaviour: http://board.net/p/testboard2

File upload limit

Hi,

Could you please tell me how to increase file upload limit?
It does not take more than 1 mb (looks like)

on client:
413 (Request Entity Too Large)
on server:
[ERROR] console - CLIENT SIDE JAVASCRIPT ERROR: {"errorId":"NFZEZ6MjVJrY2orH2zkB","msg":"Uncaught TypeError: Cannot read property 'readyState' of undefined","url":"http://snt.spellout.org/p/autoui13tex","linenumber":457,"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36"}

Thanks!

For any upload, it will fail, crash server.

[2013-02-28 16:56:58.964] [ERROR] console - TypeError: Cannot call method 'split' of undefined
at exports.onRequest (/Applications/MAMP/htdocs/etherpad-lite/node_modules/ep_fileupload/controllers/fileUpload.js:48:47)
at IncomingForm.parse (/Applications/MAMP/htdocs/etherpad-lite/node_modules/ep_fileupload/node_modules/formidable/lib/incoming_form.js:112:9)
at IncomingForm.EventEmitter.emit (events.js:93:17)
at IncomingForm._maybeEnd (/Applications/MAMP/htdocs/etherpad-lite/node_modules/ep_fileupload/node_modules/formidable/lib/incoming_form.js:523:8)
at IncomingForm.handlePart (/Applications/MAMP/htdocs/etherpad-lite/node_modules/ep_fileupload/node_modules/formidable/lib/incoming_form.js:206:12)
at File.end (/Applications/MAMP/htdocs/etherpad-lite/node_modules/ep_fileupload/node_modules/formidable/lib/file.js:68:5)
at WriteStream.flush (fs.js:1527:9)
at fs.close (/Applications/MAMP/htdocs/etherpad-lite/src/node_modules/npm-registry-client/node_modules/graceful-fs/graceful-fs.js:90:5)
at fs.close (/Applications/MAMP/htdocs/etherpad-lite/src/node_modules/graceful-fs/graceful-fs.js:95:5)
at fs.close (/Applications/MAMP/htdocs/etherpad-lite/src/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:90:5)

etherpad lite server crash on abort fileupload

When uploading a large file, if you leave the page during the upload incoming_form.js emits an error. The error propagates up and crashes the server. See below

Error: Request aborted
at IncomingMessage. (/ep_fileupload/node_modules/formidable/lib/incoming_form.js:120:19)
at IncomingMessage.emit (events.js:92:17)
at abortIncoming (http.js:1916:11)
at CleartextStream.serverSocketCloseListener (http.js:1928:5)
at CleartextStream.emit (events.js:117:20)
at tls.js:694:10
at process._tickDomainCallback (node.js:486:13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.