I'm going to upload and download a file, without knowing its type. I can tag the type of the file when it is uploaded manually through the UI. But, if this is not done, I would like to attempt to determine the type / mime type when downloaded.
also, i'm not entirely sure what the difference between the file type and mime type are.
my method currently is this:
1. take the raw file bytes:
2. convert to base64
5. convert back to bytes
6. atttempt to display.
i'm only using the mime type labels because they are standard, the actual data is not going through e-mail (but is going through xml, thus it needs to be converted anyways).