Sam Alekseev
Sam Alekseev

Reputation: 2391

ASP.NET MVC CKFinder image upload (add custom logic)

I successfully installed CKFinder and it works great with default settings. By the way i have my own logic to upload images to server (check size, resize, change quality, add watermark etc). Can i combine CKFinder image upload process with my logic? What i want is CKFinder just grab image and pass it to my methods.

Upvotes: 1

Views: 989

Answers (1)

Daniel Oliveira
Daniel Oliveira

Reputation: 1141

You can create a custom plugin like is described here and put your logic there.

CKFinder functionality can be extended with server-side plugins. Although the full source code of the CKFinder server connector is available and can be modified in any way desired, a much better way of enhancing the CKFinder connector is to create a plugin.

The main advantages of plugins are:

  • Upgrades are much easier.
  • The plugin code is stored in a single place.
  • Plugins can be easily disabled when they are not needed anymore.

Common use cases:

  • Adding a new server-side command (i.e. fileditor and imageresize plugin).
  • Working with uploaded files (i.e. watermark plugin).
  • Extending information returned by the Init command (i.e. imageresize plugin).

Hope it helps you!

Upvotes: 1

Related Questions