Reading files in binary format
I'm trying to write a plugin that would allow sending files in pdf, midi formats to our webservice for further publication.
The following scenario is implemented:
- the user creates a composition (score),
- runs the plugin,
- the plugin exports the score to pdf and midi files on local disk,
- read and sends them to our web service.
I found the following problem: pdf files need to be read in binary format, FileIO component decodes non-ASCII characters when reading. I tried to read binary files using XMLHttpRequest, but in this case there is a distortion.
Please advise how I can solve this problem?
I use MuseScore version (64-bit): 126.96.36.19935 for Windows