0
Completed

Checksum/MD5 Plugin?

dennyhz 2 years ago in Feature requests updated 2 years ago 2

Just thought I'd put in a request for a real simple, but useful plugin which could calculate the MD5 and maybe even also have a text field for to paste in an MD5 to compare against :)


Thanks!

Answer

Answer
Completed

A basic plugin that does that is very easy to create. Here's the steps:

  1. Create the folder "customizables/plugins/md5"
  2. Create a text file named "app.php" inside the new "md5" folder
  3. Paste the following inside:
<?php
class custom_md5 extends \FileRun\Files\Plugin {
   static $localeSection = 'Custom Actions: MD5';
   function init() {
      $this->JSconfig = [
         'title' => self::t('MD5'),
         'iconCls' => 'fa fa-fw fa-hashtag',
         "popup" => true,
         'width' => 500, 'height' => 450,
         'requires' => ['download']
      ];
   }
   function run() {
      $data = $this->prepareRead(['expect' => 'file']);
      echo md5_file($data['fullPath']);
   }
}

You will need to clear your browser's cache in order to see the right-click menu option "MD5" under "Open with.."


At this time we will not be adding an official plugin for this purpose, unless there will be more people requesting it.

Answer
Completed

A basic plugin that does that is very easy to create. Here's the steps:

  1. Create the folder "customizables/plugins/md5"
  2. Create a text file named "app.php" inside the new "md5" folder
  3. Paste the following inside:
<?php
class custom_md5 extends \FileRun\Files\Plugin {
   static $localeSection = 'Custom Actions: MD5';
   function init() {
      $this->JSconfig = [
         'title' => self::t('MD5'),
         'iconCls' => 'fa fa-fw fa-hashtag',
         "popup" => true,
         'width' => 500, 'height' => 450,
         'requires' => ['download']
      ];
   }
   function run() {
      $data = $this->prepareRead(['expect' => 'file']);
      echo md5_file($data['fullPath']);
   }
}

You will need to clear your browser's cache in order to see the right-click menu option "MD5" under "Open with.."


At this time we will not be adding an official plugin for this purpose, unless there will be more people requesting it.