Skip to content

DefaultUploadProcessor class

namespace: Serenity.Web   assemblySerenity.Net.Services

Default implementation for IUploadProcessor.

public class DefaultUploadProcessor : IUploadProcessor
parameter description
imageProcessor Image processor
uploadStorage Upload storage
uploadValidator Upload validator
logger Logger
avScanner Optional antivirus scanner

Public Members

name description
DefaultUploadProcessor(…) Default implementation for IUploadProcessor.
virtual CreateDefaultThumb(…) Creates the default thumbnail for image if the size is provided in the upload image options (ThumbWidth and ThumbHeight >= 0) and saves it to the target upload storage file
virtual Process(…)
class ScaleImageAsResult Result for the scale image as operation

Protected Members

name description
readonly avScanner Gets the AV scanner.
readonly imageProcessor Gets the image processor.
readonly logger Gets the logger.
readonly uploadStorage Gets the upload storage.
readonly uploadValidator Gets the upload validator.
virtual CreateAdditionalThumbs(…) Creates additional thumbs if specified in the upload image options, and saves them to the target upload storage
virtual ProcessImage(…) Depending on the image upload options, scales image, creates default and additional thumbs and saves them to the upload storage files.
virtual ScaleImageAs(…) Scales an image and saves it to an upload storage file
virtual ScaleMainImage(…) Scales the temporary image with provided upload image options if required based on the options and saves the result to the target upload storage file

Exceptions

exception condition
ArgumentNullException imageProcessor, uploadStorage or uploadValidator is null.

Remarks

Initializes a new instance of the class.

See Also