Automations allow you to apply automatic actions (background removal, auto-tagging, brand recognition, etc.) to assets during or after the upload process. It is also possible to send the uploaded asset's details to external API endpoints.
Automate and enhance asset management with custom tasks, triggered on asset upload
Upload post processes are actions that are triggered for a given asset upon its upload into Filerobot. Post-processing involves running various algorithms and ML models on an asset (e.g., detecting if it contains inappropriate content, counting the number of faces in an image, determining the dominant colors, removing the image background, and many others).
Post process tasks are automated actions that can be performed in two modes:
Synchronous - The results are evaluated before accepting the upload and returned in the response. The use of this mode is generally preferred in user-generated content (UGC) scenarios where user-uploaded images and videos must be moderated automatically based on a number of pre-defined criteria.
Asynchronous - The results are evaluated in the background (in a non-blocking manner) after the file has been uploaded. In some cases, depending on the specified post process type, the result will be appended to the asset's information, tags or metadata.
The following table is a summary of all available post process actions:
Process | API name | Supported modes | Description |
---|---|---|---|
Post processes marked with a * require ASK Filerobot credits in order to be executed
Additional details are available on the tasks' respective pages in the Scaleflex Visual AI section
The post process settings can be accessed from the Developers / Automations / Post processing menu.
When a post process automation task is activated, it will run automatically on each upload. If not activated, the task can be manually triggered for certain uploads via the Upload API using the postprocess parameter (e.g., postprocess=remove-background
).
It is possible to specify trigger rules when setting up a post process. These are conditions which must be met in order to activate the related task. If left empty, the task will be run on each upload.
Trigger rules are evaluated no matter if the task is run manually or automatically.
The following variables may be used to construct rules:
As mentioned, the synchronous tasks provide a mechanism to validate uploads using validation rules. Possible actions when conditions have been met are:
Refuse - The upload is rejected.
Notice - A notice is issued, added to the file information and returned in the API response.
Setting up many synchronous tasks might slow down the upload process significantly.
Trigger API calls on events, automate workflows and collaborate effortlessly
Webhooks are a powerful feature used in modern web development and API integrations. They provide a way for applications to communicate and exchange data in real time.
They enable users to trigger API calls to third-party endpoints upon specific events and send relevant asset's information.
The concept behind webhooks is based on the "push" model of communication, where data is actively sent to a predefined endpoint as opposed to the usual "pull" model, where applications need to request data from a server actively.
In the context of Filerobot, webhooks allow users to integrate external systems, automate workflows and stay informed about changes and more generally actions performed on their assets. When a relevant event takes place, such as a new file upload, file renaming or file movement, the webhook is triggered and a POST request is sent to a third-party endpoint, providing details about the the affected asset.
This mechanism allows seamless connections with other applications which enhances collaboration capabilities.
Using webhooks simplifies the delivery of personalized notifications or alerts to assigned recipients whenever essential actions are executed on critical assets. This facilitates prompt responses and efficient communication.
They can also be integrated with project management tools to automatically create tasks, assign responsibilities and track progress whenever assets are uploaded to or moved within the DAM.
The can be accessed from the menu.
In order to set up the webhook, the following information must be provided:
Hostname - The domain name of the third-party API that will be contacted.
Path - The specific path that together with the Hostname forms the complete target URL (Webhook URL) to which the data will be sent.
A consumer cannot always verify that the webhook it is receiving is actually coming from the expected source. Due to this, there are two authentication methods supported:
Basic authentication - The simplest way to verify a webhook. It makes use of a username
and a password
that are used for authentication when sending the data to to the Webhook URL.
OAuth2 authentication - A more secure and complex authentication method that allows users to grant limited access to their resources without exposing their credentials. This type of authentication can be used in two ways:
By specifying the Authentication endpoint
, username
and password
to retrieve a temporary token which is then used in the webhook.
By directly entering the Static bearer token
to use every time without generating a temporary one before the request.
You can specify up to 10 additional headers to be sent to the endpoint with the payload. Those headers will have the classic form "name":"value",
The triggers determine the events that need to happen in order to execute the webhook. The following ones are available:
On upload - After a successful asset upload.
On move - When the asset location is changed.
On rename - When the asset is renamed.
On delete - When the asset is deleted.
On change meta - When any metadata field is modified.
On change info - When some asset's information (e.g. title, description, etc.) is changed.
On change tag - When the asset's tags are edited.
On change label - When the asset's labels are modified.
There is a fine-grained control over which specific asset details are sent as part of the request JSON body to the selected API endpoint. This ensures that only the necessary information to handle the event effectively is communicated. Those details are divided into several categories, depending on the asset type:
Process | API name | Supported modes | Description |
---|---|---|---|
Property | Asset type | Description | Example |
---|---|---|---|
Process | Validation rule | Example |
---|---|---|
File (All assets) | Video | Image |
---|
Calculate blurhash
blurhash
async
Generates a blurhash (compact representation that can be used as a placeholder) of the image. The result is added to the asset's information.
Count faces
face-count
sync / async
Returns the number of face(s) detected in the image. Can be used for classification or to ensure the presence / absence of face(s) upon upload.
Extract brand logo *
brand-detect
sync / async
Detects the presence of logos from a database containing thousand of popular brands. The list of recognized brands is included in the file information.
Extract dominant colors
dominant-color
sync / async
Analyzes the image and returns a palette consisting of the most prominent colors in the image.
Index for face clustering *
face-clustering
async
Adds the image to an index for face clustering.
Index for image similarity search
image-similarities
async
Adds the image to an index for similarity search.
Not Safe For Work *
nsfw
sync / async
Detects adult or explicit content within the image.
Plate number blurring *
plate-blurring
async
Finds and automatically blurs vehicle license plate numbers in the image.
Recognize number plate *
plate-recognition
sync / async
Detects and recognizes car license plates in the image. The result is included in the asset information.
Recognize text (OCR) *
ocr
sync / async
Extracts any text readable in the image.
Remove artifacts (Quality improvement) *
remove-artifacts
async
Removes any JPEG artifacts and improves the quality of the image.
Remove background *
remove-background
sync / async
Removes the background of the image. Useful for products, portraits, etc.
Scene classification *
scene-classification
sync / async
Detects scene categories, attributes and type of environment in the image.
Sport classification *
sport-classification
async
Detect if the provided image depicts a sport activity and add its name to metadata.
Tag with AI *
autotag
async
Performs automatic tag generation for the image.
Validate image properties
image-properties
sync
Validates if the image meets any number of predefined criteria.
Compress video *
compress
async
Changes the video bitrate and resolution.
Convert video *
convert
async
Converts the video file to another format.
Transcode video *
transcode
sync
Converts the video into adaptive streaming formats (HLS/DASH).
Trim video *
trim
async
Trims the video file based on provided time intervals.
Validate video properties
video-properties
sync
Validates if the video meets any number of predefined criteria.
Image/Video width (px)
images / videos
Horizontal image dimensions / frame size (in pixels).
Image width (px) is smaller than 500
Image/Video height (px)
images / videos
Vertical image dimensions / frame size (in pixels).
Video height (px) is larger or equal than 200
Image format
images
The file type of the image.
Image format contains PNG, JPEG
File size (B)
images / videos
The size of the asset in bytes.
File size (B) is larger than 5000000
Video bitrate (bps)
videos
The video bitrate in bits per second.
Video bitrate (bps) is smaller than 1500000
Video duration (s)
videos
The video duration in seconds.
Video duration (s) is larger than 60
Upload folder path
images / videos
The location in which the asset is getting uploaded.
Upload folder path starts with '/users'
Count faces
Number of faces
Number of faces is smaller than 1 => Refuse
Not Safe For Work
NSFW
Drawing
Hentai
Neutral
Porn
NSFW is larger than 0.70 => Refuse
Recognize number plate
Number of characters in number plate
Number plate content
Number plate content does not start with 'C' => Notice
Recognize text (OCR)
Text contains
Text contains 'Copyright' => Refuse
Validate image properties
Image/Video width (px)
Image/Video height (px)
Image format
File size (B)
Upload folder path
Image width (px) is smaller than 500 => Notice
Validate video properties
Image/Video width (px)
Image/Video height (px)
File size (B)
Video bitrate (bps)
Video duration (s)
Upload folder path
Video bitrate (bps) is smaller than 800000 => Refuse
Name | Width | Width |
Size | Height | Height |
Path | Length (in seconds) |
MIME type | Bitrate |
CDN link | HLS/DASH playlist URL |
File UUID |