ppetrid/yawd-elfinder

Flask usage

Closed this issue · 6 comments

Is there any hope of using yawd-elfinder with a flask backend instead of django backend? Any pointers on how to get started with this?

As far as I know the only python implementations of the elfinder connector (v2) are yawd-elfinder and django-elfinder (which also includes a bunch of django-related code).

Probably a good place to start is the elfinder.volumes package which implements all file operations and the elfinder.connector module that controls all drivers and commands. All that is almost pure python code and normally it will be easy to adopt. On top of the connector, you should implement a flask version of the elfinder.views.ElfinderConnectorView that actually handles the http requests and responses.

What does yawd-elfinder assume on the server? On my servers I only have python available. Does it need anything else like php/imgmagic etc? Also- it would be nice if the frontend only expected a REST Api from the backend, that way it would be easy to integrate it with any Backend system.

yawd-elfinder implements the server-side part. the elfinder (http://elfinder.org/) client indeed expects a REST api to work. That's what yawd-elfinder implements, a django backend for elfinder + some extra django-related stuff. I suggest you take a look at their wiki (https://github.com/Studio-42/elFinder/wiki) and maybe just use yawd-elfinder as a starting point for your flask backend.

yawd: when you started working on the django backend, did you have to assume anything apart from python+django installed on the server? php? imagemagik? etc?

when we started coding the backend, no, there were no requirements or assumptions. But the code we wrote now needs PIL and python-magic installed. If you implement a flask backend you might as well need an image manipulation library; elfinder supports some cool image operations (which of course you may choose not to implement).

Are you using the version 2.0 elfinder yet? If not, any plans of migrating?