Giter VIP home page Giter VIP logo

elfinder-2.x-servlet's Issues

Use elFinder without XML configuration

Wouldn't it be nice to use elFinder by just adding a maven depency and a single initialisation in the code, so without all the xml-config? Spring can work without them.

I am not sure if this is something you want, but just a suggestion

No server side filtering by mime type

There is a client-side option in elFinder that allows one to filter the results by mime:

{
  // ...
  // Restrict to images and flash files
  onlyMimes: ['image', 'application/x-shockwave-flash']
  // ...
}

Each option in the onlyMimes array is sent on the server-side URL requests, e.g:

?mimes[]=image&mimes[]=application%2Fx-shockwave-flash&cmd=open&target=SOMEHASH&init=1&tree=1

This servlet doesn't yet support the client-side filtering (i.e. no matter what you give to the onlyMimes array, all files are returned in response JSONs).

The exec command in the elFinder PHP class seems to take the mimes array and set the filter. Not sure where this would need to be implemented in the Java servlet.

IE Drop file(s) for upload does not work

The Drop of file(s) for IE (11) does not work while Chrome does.

Class: UploadCommandExecutor.java

For the file droped: (ex. "C:\temp\abc.txt"):
Chrome: fileName = "abc.txt"
IE: fileName = "C:\temp\abc.txt"

Temporary fix: Always try to get only the filename.

    // OLD: String fileName = fis.getName();
    // OLD: FsItemEx newFile = new FsItemEx(dir, fileName);
    java.nio.file.Path p = java.nio.file.Paths.get(fis.getName());
    FsItemEx newFile = new FsItemEx(dir, p.getFileName().toString());

Note: Could it be fixed at higher level like javascript?

File Upload failed from IE browser

Hi,
There's a npe when uploading file from IE (11) browser.
see stacktrace (french logs !) :
java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(Unknown Source)
at cn.bluejoe.elfinder.localfs.LocalFsVolume.createFile(LocalFsVolume.java:43)
at cn.bluejoe.elfinder.controller.executor.FsItemEx.createFile(FsItemEx.java:65)
at cn.bluejoe.elfinder.controller.executors.UploadCommandExecutor.execute(UploadCommandExecutor.java:40)
at cn.bluejoe.elfinder.controller.executor.AbstractJsonCommandExecutor.execute(AbstractJsonCommandExecutor.java:24)
at cn.bluejoe.elfinder.controller.executor.AbstractCommandExecutor.execute(AbstractCommandExecutor.java:102)
at cn.bluejoe.elfinder.controller.ConnectorController.connector(ConnectorController.java:67)
at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:440)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:428)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

After debugging, the problem is that IE give for the file name the full path of the file. With Chrome just the filename is sent.
The problem is on UploadCommandExecutor (line 38) : String fileName = fis.getName(); is set with the fullpath instead of only the file name.

Hope this helps and fix will come :-)

Regards.

Error uploading a file, "java.io.IOException: charsetName"

Cannot upload a file. A error dialog is displayed stating "Unable to connect to backend". Tried running on both Tomcat 7.0.59 and JBoss EAP 6.3. The server logs the following error:

2015-04-10 07:56:57,844 [http-bio-8080-exec-2] DEBUG [org.springframework.web.bind.annotation.support.HandlerMethodInvoker] - Invoking request handler method: public void cn.bluejoe.elfinder.controller.ConnectorController.connector(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException
2015-04-10 07:56:57,845 [http-bio-8080-exec-2] DEBUG [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver] - Resolving exception from handler [cn.bluejoe.elfinder.controller.ConnectorController@7939de8b]: java.io.IOException: charsetName
2015-04-10 07:56:57,845 [http-bio-8080-exec-2] DEBUG [org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver] - Resolving exception from handler [cn.bluejoe.elfinder.controller.ConnectorController@7939de8b]: java.io.IOException: charsetName
2015-04-10 07:56:57,846 [http-bio-8080-exec-2] DEBUG [org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver] - Resolving exception from handler [cn.bluejoe.elfinder.controller.ConnectorController@7939de8b]: java.io.IOException: charsetName
2015-04-10 07:56:57,847 [http-bio-8080-exec-2] DEBUG [org.springframework.web.servlet.DispatcherServlet] - Could not complete request
java.io.IOException: charsetName
at cn.bluejoe.elfinder.controller.ConnectorController.connector(ConnectorController.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:585)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

Maven问题

不知道为什么maven的1.1版本我在maven中心库里面搜索出来是war包的,不知道怎么导入,求指导

上传文件夹问题

上传多个文件夹时, 会合成一个名叫null文件夹,所有文件都混在同一个文件夹内
dv5 jme89m5cslnt7e giac
su oitl6 dwtc1 o x0f2p

Unable to connect backend

I have implemented elfinder with jar file of this same project. and implemented connector perfectly. But sometimes it is giving me above error with HTTP error 404 . and sometimes works perfect.
Where can I be wrong? And where could be file saved in my system if I have uploaded from elfinder

Integration Elfinder Connector with CKEditor

Hello, I'm trying to call connector from CKEditor with Elfinder , editing the config.js of Ckeditor ( I follow https://github.com/Studio-42/elFinder/wiki/Integration-with-CKEditor and http://docs-old.ckeditor.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader) )
But when I click on "Send to server" of CKEditor I have target == null

CKEDITOR.replace( 'editor1',
{
config.filebrowserBrowseUrl = '/myapp/elFinder/elfinder-cke.html';
config.filebrowserImageBrowseUrl = '/myapp/elFinder/elfinder-cke.html';
config.filebrowserUploadUrl = '/myapp/elfinder-servlet/connector?cmd=upload';
config.filebrowserImageUploadUrl = '/myapp/elfinder-servlet/connector?cmd=upload';
});

Anyone integrate elfinder in ckeditor?
thank a lots

mvn install 报错

executors/PasteCommandExecutor.java:[28,54] -source 1.6 中不支持 diamond 运算符
[ERROR] (请使用 -source 7 或更高版本以启用 diamond 运算符)

Make maven artifact release

For inclusion into the Sakai project it would be helpful if this project was released as a maven artifact so that Sakai builds could depend on it and download it, rather than including a copy of the elfinder code in the Sakai codebase.

The alternative is that we have a Sakai fork, which we release to the Sonatype repository.

Do you have any preferences?

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.