Parsing or decoding .pluginPayloadAttachment files?

Solution 1:

The pluginPayloadAttachment extension doesn't actually convey the type of the file, unfortunately. Depending on the file, you may be able to glean the type from the byte data it begins with. Some common types you might run into are listed here:

Byte Array Type
89 50 4E 47 0D 0A 1A 0A PNG Image
FF D8 FF JPEG Image
47 49 46 38 GIF Image
49 49 2A 00 or 4D 4D 00 2A TIFF Image