I am reading in a file and want to add MIME header infromation to the top of the file.
For example: I have a text file called test.txt. I read the file into a byte array then want to append the following to the beggining:
Content-Type: text/plain;
name="test.txt"
Content-Transfer-Encoding: binary
Content-Disposition: attachment;
filename="test.txt"
How can i get the what the content type is? And how would you reccomend adding this to the beggining of the file? I was planning on creating a string with that information then converting it to a byte array and sticking it on the front of my file buffer but I am worried about running into encoding problems.