A SERVICE OF

logo

MediaScript Objects and Methods 39
Syntax
resp.setMedia(
<Media object>
);
getMedia()
Returns the current response Media object.
Syntax
resp.getMedia();
Parameters
This function has no parameters.
setResponseType()
Sets the response type.
Syntax
resp.setResponseType(
[RespType]
);
Parameters
RespType - sets the response type:
RespType.Cached saves the response object or file to the MediaResults cache
directory so that future requests are returned directly by the filter.
RespType.Streamed bypasses the cache and returns the response data directly to the
filter.
RespType.Path (the default) returns the full native path of a file to the filter but does
not copy the file to the cache.
Example
var img = new Media(); img.load(name @ "foo.jpg");
img.save(type @ "gif");
resp.setResponseType(RespType.Streamed);
getResponseType()
Returns the response type previously set by setPath(), setObject(), or setResponseType().
NOTE: If no response path is set, the function returns null.
Syntax
var respType = resp.getResponseType();
Parameters
This function has no parameters.