In this tutorial, you implement a file processor, called WatermarkMaker, that is executed each time you upload a JPEG image in your library. The file processor adds a watermark in the top left corner of every image you upload.
You first create the file processor class and then add the file processor in the administration settings in Sitefinity CMS backend.
Create a file processor class that inherits the FileProcessorBase class. Next, implement your logic for the CanProcessFile and Process methods:
NOTE: In the code above, you also override the Initialize(NameValueCollection config) method. The config parameter, passed to the method, lists all additional parameters that the file processor uses. In this example, font, color, and text.
NOTE:The type must be identical to the name of the class you implemented in the previous section of the tutorial.
As a result, all images of MIME type “image/jpeg”, for example, JPEG, JPG, and JPE are processed by the WatermarkMaker file processor before being saved in the library.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important
Copyright © 2021 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity