Jump to content

ProcessFileManager


matjazp
 Share

Recommended Posts

A module for managing files and folders. Supports creating, opening (e.g. viewing, playing, editing), renaming, moving, copying, deleting and searching for files. You can also view and change (not supported on Windows) file and directory permissions. 

https://github.com/matjazpotocnik/ProcessFileManager

Screenshot 2018-01-06 20.06.44_cr.jpg

The author of FileManager component is (c) 2006 - 2018 Gerd Tentler, http://www.gerd-tentler.de/tools/filemanager/. I modified it to work with ProcessWire as a module. Please see license files on usage in commercial projects!

  • Like 18
  • Thanks 1
Link to comment
Share on other sites

Awesome!

Just a few remarks after trying it out for 5-10 minutes...

My main concern with such a powerful tool is security: I see you created a special permission for this module. I guess that your intention was that only superusers are able to use this module. If I allowed regular editors use this module, it'll only be a question of time till someone breaks stuff (editing core files, PHP etc.). I just want to make sure there's no nasty backdoor (like with WP's code editor, that is still installed and enabled by default, and is still a massive security hole)...

  • Like 1
Link to comment
Share on other sites

This module is awesome! Exactly what I was thinking about these holidays. I was about to try to integrate codiad into PW, but it is probably not needed anymore.

The editor is obviously codemirror (have you considered monaco, by the way). Is this one a filemanager used?

A few questions:

  1. Does it seem possible to limit edit capabilities for roles by directory/filetype in the future?
  2. Does it seem possible to run terminal commands through the interface for on-site asset building and such?
  3. Are there any known platform limitations?
Link to comment
Share on other sites

8 hours ago, dragan said:

My main concern with such a powerful tool is security: I see you created a special permission for this module. I guess that your intention was that only superusers are able to use this module.

Yes.

8 hours ago, dragan said:

If I allowed regular editors use this module

If you allow other users to use this module than it's not free anymore, see license file for filemanager.

8 hours ago, dragan said:

I just want to make sure there's no nasty backdoor

Unfortunately, I can't guarantee that. This is first alpha release of the module, just to see if there is any interest in this at all. I didn't write the components, I just made filemanager works in PW (and it was a LOT of work too). 

  • Like 2
Link to comment
Share on other sites

18 hours ago, Ivan Gretsky said:

I was about to try to integrate codiad into PW,

Hmm. never saw this, will take a look.

EDIT: I like the way codiad works, that's how filemanager should work. It has more modern approach, it's fast, uses ace, it's more developer-centric.

18 hours ago, Ivan Gretsky said:

(have you considered monaco, by the way).

I did, tried it somewhere else (ProcessFileEdit perhaps?), but failed. 

18 hours ago, Ivan Gretsky said:

Is this one a filemanager used?

Yes. I modified my original post to reflect that, I just forget it yesterday.

18 hours ago, Ivan Gretsky said:

Does it seem possible to limit edit capabilities for roles by directory/filetype in the future?
Does it seem possible to run terminal commands through the interface for on-site asset building and such?

 

Everything is possible, but I'm not sure in what direction will this module move (if at all). filemanager by itself allows hiding files of certain types, but it's disabled. The best way would be to try the original filemanager and all the options available (or you can try in the module itself, check config.inc.php).

18 hours ago, Ivan Gretsky said:

Are there any known platform limitations?

On windows, you can't change permissions. Displayed permissions might be inaccurate. I modified filemanager so that at least file permissions should be correct. On file info, you will see the correct owner of the file/folder and acl list.

  • Like 1
Link to comment
Share on other sites

17 hours ago, matjazp said:

A module for managing files and folders. Supports creating, opening (e.g. viewing, playing, editing), renaming, moving, copying, deleting and searching for files. You can also view and change (not supported on Windows) file and directory permissions. 

https://github.com/matjazpotocnik/ProcessFileManager

Screenshot 2018-01-06 20.06.44_cr.jpg

The author of FileManager component is (c) 2006 - 2018 Gerd Tentler, http://www.gerd-tentler.de/tools/filemanager/. I modified it to work with ProcessWire as a module. Please see license files on usage in commercial projects!

This would be the most useful module for me, because I tend to do my sidejobs at the office after work (I know, it's not proper, commuting issues that's why ) and we have a strong Firewall that blocks FTP and CPanel pages, so this will come real handy, am assuming it has a code-editor in it. thanks a bunch.  

  • Like 1
Link to comment
Share on other sites

On 7. 1. 2018 at 1:51 PM, Sephiroth said:

am assuming it has a code-editor in it

Yes, CodeMirror and, later maybe monaco (PR's welcome).

Edited by matjazp
monaco is now supported
  • Like 2
Link to comment
Share on other sites

On 1/7/2018 at 4:48 PM, matjazp said:

Yes, CodeMirror and, later maybe monaco (PR's welcome).

Am looking at that too, I will fork your project over the weekend and see how I can contribute, am really interested in this, though I have a feeling Monaco feels like overkill, but i will evaluate it and see.

 

Link to comment
Share on other sites

I have a question related to security. 

AFAIK in a lot of shared hosts that are based upon php as apache module, not a cgi version, the php www-user only (should) have write access to files under assets, not modules and templates. 

Is there a way, workaround, for those cases to use the module too?

 

Link to comment
Share on other sites

2 hours ago, horst said:

not modules and templates

But if it doesn't have access to "modules" then you can't use the PW Upgrade module either and I am pretty sure there are a lot of people using that. Sure it may not be the most secure approach, but there will always be some trade-off.

Link to comment
Share on other sites

2 hours ago, horst said:

AFAIK in a lot of shared hosts that are based upon php as apache module, not a cgi version, the php www-user only (should) have write access to files under assets, not modules and templates.

That would prevent you from using Upgrade module, but yes, this is how it should be done in secure environments and how I have set all my sites (I'm on windows but the principle is the same). I upgrade (if at all) manually, since I'm the administrator of the server. 

Filemanager has some more options that might come handy: you can hide specific directories (eg. wire), you can hide "system files", hide file path in file details, hide symbolic link target, you can disable upload, download, edit, copy, rename, move, create, search, permissions. Those options are not available in module config settings, since the module is intended for site admins (superusers) primarily and I assume he would want all features enabled... 

  • Like 1
Link to comment
Share on other sites

4 hours ago, Sephiroth said:

Am looking at that too, I will fork your project over the weekend and see how I can contribute, am really interested in this, though I have a feeling Monaco feels like overkill, but i will evaluate it and see.

Yeah, monaco has large size, 32 MB, and it's slower on start than CodeMirror or Ace.

Link to comment
Share on other sites

18 hours ago, pwired said:

Hi Sephiroth

Did you try net2ftp, monsta ftp and cpanel proxy urls at the office ?

Net2FTP logs me out everytime, I feel it must be network related haven't tried monsta FTP but i like the having to just edit the file from the same application however it should only edit the modules and templates and not core code. 

  • Like 1
Link to comment
Share on other sites

7 minutes ago, matjazp said:

Maybe ProcessFileEdit module would be enough for you?

ProcessFileEdit is fantastic and I think ProcessFileManager has a useful role as well when you need to create/delete/move files around and don't have your dev machine with you.

Also, here's a sneak peak for the new File Editor Panel in Tracy (coming soon!).

This comes with: Test (changes don't affect other users) and Restore functionality (in case you save and made a major mistake) for all file types and even continues to work if you accidentally introduced a fatal error into the code you just saved - this allows you to recover without needing FTP access. Of course this doesn't replace the functionality of ProcessFileManager at all, but another tool in the arsenal.

image.png.f5fcf97ba388aa3e051d46bfc5408c24.png

  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 years later...
21 hours ago, tcnet said:

Please, can somebody tell me the reason why this useful module is not available in the module directory?

The module was never published in the module directory :-) 

  • Like 2
Link to comment
Share on other sites

2 hours ago, tcnet said:

Do you consider to maintain this module?

Yes and no. A large part of this module is not written by me, so I can't support any new features, I can only make it work as a Processwire module. That's why I didn't publish it in the module directory. It's also a powerful tool with the potential of wiping your site if it lands in the wrong hands, so I didn't want too much publicity. I don't work with PW so much anymore, and I'm becoming a bit rusty and can't afford to maintain too many modules. Nevertheless, I will do what I can to help if problems arise.

  • Like 2
Link to comment
Share on other sites

5 hours ago, matjazp said:

I don't work with PW so much anymore

Is Processwire losing traction?? ... lately I have read many comments in this forum from several of the most prominent people in the discussions who are no longer working with Processwire .. 😱??

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By monollonom
      (once again I was surprised to see a work of mine pop up in the newsletter, this time without even listing the module on PW modules website 😅. Thx @teppo !)
      FieldtypeQRCode
      Github: https://github.com/romaincazier/FieldtypeQRCode
      Modules directory: https://processwire.com/modules/fieldtype-qrcode/
      A simple fieldtype generating a QR Code from the public URL of the page, and more.
      Using the PHP library QR Code Generator by Kazuhiko Arase.

      Options
      In the field’s Details tab you can change between .gif or .svg formats. If you select .svg you will have the option to directly output the markup instead of a base64 image. SVG is the default.
      You can also change what is used to generate the QR code and even have several sources. The accepted sources (separated by a comma) are: httpUrl, editUrl, or the name of any text/URL/file/image field.
      If LanguageSupport is installed the compatible sources (httpUrl, text field, ...) will return as many QR codes as there are languages. Note however that when outputting on the front-end, only the languages visible to the user will be generated.
      Formatting
      Unformatted value
      When using $page->getUnformatted("qrcode_field") it returns an array with the following structure:
      [ [ "label" => string, // label used in the admin "qr" => string, // the qrcode image "source" => string, // the source, as defined in the configuration "text" => string // and the text used to generate the qrcode ], ... ] Formatted value
      The formatted value is an <img>/<svg> (or several right next to each other). There is no other markup.
      Should you need the same markup as in the admin you could use:
      $field = $fields->get("qrcode_field"); $field->type->markupValue($page, $field, $page->getUnformatted("qrcode_field")); But it’s a bit cumbersome, plus you need to import the FieldtypeQRCode's css/js. Best is to make your own markup using the unformatted value.
      Static QR code generator
      You can call FieldtypeQRCode::generateQRCode to generate any QR code you want. Its arguments are:
      string $text bool $svg Generate the QR code as svg instead of gif ? (default=true) bool $markup If svg, output its markup instead of a base64 ? (default=false) Hooks
      Please have a look at the source code for more details about the hookable functions.
      Examples
      $wire->addHookAfter("FieldtypeQRCode::getQRText", function($event) { $page = $event->arguments("page"); $event->return = $page->title; // or could be: $event->return = "Your custom text"; }) $wire->addHookAfter("FieldtypeQRCode::generateQRCodes", function($event) { $qrcodes = $event->return; // keep everything except the QR codes generated from editUrl foreach($qrcodes as $key => &$qrcode) { if($qrcode["source"] === "editUrl") { unset($qrcodes[$key]); } } unset($qrcode); $event->return = $qrcodes; })
    • By Sebi
      AppApiFile adds the /file endpoint to the AppApi routes definition. Makes it possible to query files via the api. 
      This module relies on the base module AppApi, which must be installed before AppApiFile can do its work.
      Features
      You can access all files that are uploaded at any ProcessWire page. Call api/file/route/in/pagetree?file=test.jpg to access a page via its route in the page tree. Alternatively you can call api/file/4242?file=test.jpg (e.g.,) to access a page by its id. The module will make sure that the page is accessible by the active user.
      The GET-param "file" defines the basename of the file which you want to get.
      The following GET-params (optional) can be used to manipulate an image:
      width height maxwidth maxheight cropX cropY Use GET-Param format=base64 to receive the file in base64 format.
    • By MarkE
      This fieldtype and inputfield bundle was built for storing measurement values within a field, rendering them in a variety of formats and converting them to other units or otherwise modifying them via the API.
      The API consists of a number of predefined functions, some of which include...
      render() for rendering the measurement object, valueAs() for converting the value to another unit value, convertTo() for converting the whole measurement object to different units, and add() and subtract() for for modifying the stored value by the value (converted as required) in another measurement. In the admin the inputfield includes a checkbox (which can be optionally disabled) for converting values on page save. For an example if a value was typed in as centimeters, the unit was changed to metres, and the page saved with this checkbox selected, said value would be automatically converted so that e.g. 170 cm becomes 1.7 m.

      A simple length field using Fieldtype Measurement and Inputfield Measurement.
      Combination units (e.g. feet and inches) are also supported.
      Please note that this module is 'proof of concept' at the moment - there are limited units available and quite a lot of code tidying to do. More units will be added shortly.
      See the GitHub at https://github.com/MetaTunes/FieldtypeMeasurement for full details and updates.
    • By tcnet
      File Manager for ProcessWire is a module to manager files and folders from the CMS backend. It supports creating, deleting, renaming, packing, unpacking, uploading, downloading and editing of files and folders. The integrated code editor ACE supports highlighting of all common programming languages.
      https://github.com/techcnet/ProcessFileManager

      Warning
      This module is probably the most powerful module. You might destroy your processwire installation if you don't exactly know what you doing. Be careful and use it at your own risk!
      ACE code editor
      This module uses ACE code editor available from: https://github.com/ajaxorg/ace

      Dragscroll
      This module uses the JavaScript dragscroll available from: http://github.com/asvd/dragscroll. Dragscroll adds the ability to drag the table horizontally with the mouse pointer.
      PHP File Manager
      This module uses a modified version of PHP File Manager available from: https://github.com/alexantr/filemanager
       
    • By tcnet
      This module implements the website live chat service from tawk.to. Actually the module doesn't have to do much. It just need to inserted a few lines of JavaScript just before the closing body tag </body> on each side. However, the module offers additional options to display the widget only on certain pages.
      Create an account
      Visit https://www.tawk.to and create an account. It's free! At some point you will reach a page where you can copy the required JavaScript-code.

      Open the module settings and paste the JavaScript-code into the field as shown below. Click "Submit" and that's all.

      Open the module settings
      The settings for this module are located int the menu Modules=>Configure=>LiveChatTawkTo.

       
×
×
  • Create New...