Name

DeliverImage — allow delivery of images through Interchange

SYNOPSIS

No | Yes

DESCRIPTION

The directive specifies whether images can be fetched directly over the link program.

If the requested file is present and the MimeType for the file's extension begins with image/, the path will be adjusted to add ImageDir or ImageDirSecure, and a status 302 ("Moved temporarily") issued. At that point, the image should be visible on users' screens.

This whole thing happens before database or session opens, and is quite fast. $Vend::tmp_session is set so no cookie is issued.

DIRECTIVE TYPE AND DEFAULT VALUE

Catalog directive

EXAMPLES

Example: Enabling DeliverImage

Put the following in catalog.cfg:

DeliverImage Yes

Now to request an image, instead of the usual page (such as index.html), ask Interchange for say, interchange.png (given that the file is present in ImageDir or ImageDirSecure, of course).


NOTES

This feature was introduced to help cope with the unpleasant behavior of the Mozilla HTML editor.

AVAILABILITY

DeliverImage is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 628

['DeliverImage',     'yesno',       'no'],

Source: lib/Vend/Config.pm
Line 5414 (context shows lines 5414-5426)

sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
  return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
  return 0;
}
else {
  config_error("Use 'yes' or 'no' for the $var directive\n");
}
}

AUTHORS

Mike Heins

SEE ALSO

DocBook! Interchange!