[ic] Trouble with the tag mime part and presetting the name of the attachment

Joachim Leidinger interchange-users@interchange.redhat.com
Wed Aug 15 05:38:01 2001


Mike Heins wrote:
[...]
> > Thank you for your suggestion and sorry for my long e-mail! I've tried
> >
> > ----------snip--------
> > [tag mime header][/tag]
> > [tag mime type text/comma-separated-values; name="Bestellung_[scratch
> > bestellnummer].csv"][/tag]
> 
> This has zero chance of working because tags are not interpolated in
> tag arguments unless quoted. You might get it going with something on
> the order of:
> 
> [tag arg='mime type text/comma-separated-values; name="Bestellung_[scratch bestellnummer].csv'][/tag]

Thank you for your time. With quoted arguments, I get

----snip-----
[]
  --010815103745-Rb6dcgaW-482:=1219
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID:
<MiniVend.3.14-5.010815103745.Rb6dcgaW.484@http://www.leidinger.dev/cgi-bin/owkpa>
Content-Description: type="Bestellung_000163.csv"

.....
  --010815103745-Rb6dcgaW-482:=1219--
----snip-----

My testing codes was

-----snip---------
[tag arg='mime type text/comma-separated-values;
name="Bestellung_TEST.csv"'][/tag]
[tag mime type="Bestellung_[scratch bestellnummer].csv"]
....
[/tag]
-----snip---------

Another suggestion from Racke like

------snip-----
[tag op="mime" type='application/x-...; name="[scratch xxx].csv'
description='type="Bestellung-[scratch xxx].csv"']
DEINE BESTELLUNG, FASEL
[/tag]
------snip-----

does not work. But after a long running trial-and-error-test, I've found
a solution with a little bit error. The next codes

----------snip--------
[tag mime type arg='text/comma-separated-values;
name="Bestellung_[scratch bestellnummer].csv"'][/tag]
[tag mime type='Bestelldaten Nr. [scratch bestellnummer]']
....
[/tag]
----------snip--------
 
make

--------snip----------
  --010815111115-Rb6dcgaW-821:=1708
Content-Type: arg='text/comma-separated-values;
name="Bestellung_000175.csv"'
Content-ID:
<MiniVend.3.14-5.010815111115.Rb6dcgaW.823@http://www.leidinger.dev/cgi-bin/owkpa>
Content-Description: type='Bestelldaten Nr. 000175'
....
   --010815111115-Rb6dcgaW-821:=1708--
--------snip----------

But without [tag ....arg='....'], it doesn't work. I can live with
"Conten-Type: arg='....'", but I would prefer to get a right solution.
If I've time, I will test that with IC 4.8.1 and see what I get.

> You can also write a UserTag to format things for you.... But you have
> reached the limit of what I will do anymore for Minivend 3. Time to
> update, you are about 10 revs and two years back. 8-)

Yes! You are right! But I've test my codes with IC 4.6.5 too and get the
same misbehavior. 
Can you give me a little tip to set the mime header with an usertag?
Something like

Usertag setminetype ......
Usertag setmimetype ROUTINE <<EOR
sub{
my ($type, $name) = @_;
my $mimetype = "Content-Type: $type; name=\"$name\"";
$Vend::MIME_TYPE = $mimetype;
....
}

?

Thanks!

Joachim


-- 
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[Hans-Joachim.leidinger@bpanet.de]
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de