How to represent multiple files in a forum post?

Jonathan Marler johnnymarler at gmail.com
Mon Feb 19 03:07:51 UTC 2018


On Sunday, 18 February 2018 at 23:46:05 UTC, Sönke Ludwig wrote:
> Am 14.02.2018 um 19:33 schrieb Jonathan Marler:
>> @timotheecour and I came up with a solution to a common 
>> problem:
>> 
>> How to represent multiple files in a forum post?
>> 
>
> Why not multipart/mixed? Since this is NNTP based, wouldn't 
> that be the natural choice? That it, assuming that 
> forum.dlang.org is the target for this, of course.

Actually, using multipart/mixed was my initial thought! But that 
format is a bit awkward and verbose for humans to type, which 
makes sense because it was designed to be generated by programs, 
not as a human-maintained block of text.


HAR:
======================================================================
--- a.txt
This is a.txt
--- b.txt
This is b.txt
======================================================================


Multipart:
======================================================================
Content-Type: multipart/alternative; boundary=<some-boundary>

--<some-boundary>
Content-Type: text/plain; charset=us-ascii
Filename: a.txt

This is a.txt

--<some-boundary>
Content-Type: text/plain; charset=us-ascii
Filename: b.txt

This is b.txt
======================================================================



HAR was actually born out of Multipart, it's really just a 
simplified version of it :)


More information about the Digitalmars-d mailing list