aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/multipart
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scripts/multipart/multipart.cgi.in22
1 files changed, 15 insertions, 7 deletions
diff --git a/scripts/multipart/multipart.cgi.in b/scripts/multipart/multipart.cgi.in
index 9a01c25..8792c7d 100644
--- a/scripts/multipart/multipart.cgi.in
+++ b/scripts/multipart/multipart.cgi.in
@@ -155,11 +155,14 @@ while(! $end) {
}
$type = $header{"content-type"};
$dispos = $header{"content-disposition"};
- if ((! $type || $type =~ /^text\/plain/i) &&
- (! $dispos || $dispos =~ /^inline/i)) {
- $plain = 1;
- } else {
- $plain = 0;
+ $plain = 0;
+ $image = 0;
+ if (! $dispos || $dispos =~ /^inline/i) {
+ if (! $type || $type =~ /^text\/plain/i) {
+ $plain = 1;
+ } elsif ($type =~ /^image\//i) {
+ $image = 1;
+ }
}
$body = '';
while(<F>) {
@@ -193,8 +196,13 @@ while(! $end) {
print "<input type=hidden name=file value=\"$qfile\">\n";
print "<input type=hidden name=boundary value=\"$qboundary\">\n";
print "<input type=hidden name=count value=\"$count\">\n";
- print "<input type=submit name=submit value=\"",
- &html_quote($name), "\">\n";
+ if ($image) {
+ print "<input type=image name=submit src=\"$CGI?file=$qfile&amp;boundary=$qboundary&amp;count=$count\" alt=\"",
+ &html_quote($name), "\">\n";
+ } else {
+ print "<input type=submit name=submit value=\"",
+ &html_quote($name), "\">\n";
+ }
print "</form>\n"
}
if ($plain) {