ltm rule command ADAPT preview sizeΒΆ

iRule(1)					  BIG-IP TMSH Manual					     iRule(1)

ADAPT::preview_size
       Sets or returns the preview-size attribute.

SYNOPSIS
       ADAPT::preview_size (ADAPT_CTX)? (ADAPT_SIDE)? (SIZE)?

DESCRIPTION
       The ADAPT::preview_size command sets or returns the preview-size attribute of the ADAPT filter on the current
       or specified side of the virtual server connection for which the iRule is being executed.

       Syntax

       ADAPT::preview_size []

	   * Gets the preview-size attribute for the current side

       ADAPT::preview_size [] request

	   * Gets the preview-size attribute for the request-adapt side

       ADAPT::preview_size [] response

	   * Gets the preview-size attribute for the response-adapt side

       ADAPT::preview_size [] 

	   * Sets the preview-size attribute for the current side

       ADAPT::preview_size [] request 

	   * Sets the preview-size attribute for the request-adapt side

       ADAPT::preview_size [] response 

	   * Sets the preview-size attribute for the response-adapt side

       The optional  argument applies the command to a specific context. Useful when there are dynamic
       contexts.  If "request" or "response" is specified, the context must be on the appropriate side (client or
       server, respectively).

RETURN VALUE
       Returns the current or modified preview size (bytes).

VALID DURING
       HTTP_REQUEST, HTTP_RESPONSE, HTTP_PROXY_REQUEST, ADAPT_REQUEST_RESULT, ADAPT_RESPONSE_RESULT

EXAMPLES
	when HTTP_RESPONSE {
	    if { [HTTP::header "Content-Type"] contains "image" } {
		ADAPT::select ivs-icap-image
		ADAPT::preview_size 10000
	    }
	    if { [HTTP::header "Content-Type"] contains "video" } {
	       ADAPT::select ivs-icap-video
	       ADAPT::preview_size 30000
	    }
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-11.3.0 --First introduced the command.

BIG-IP						      2020-06-23					     iRule(1)