Hi,
File upload via http is a complex process. E.g.: https://stackoverflow.com/questions/8659808/how-does-http-file-upload-work
I never used YouTrack, but still I think that this should be a two-step process:
-- You need to create an issue first and get its id or whatever is required to address the issue in the future;
-- The second step is to use some other API call that will upload the file from your local system to the server and link uploaded file to the issue.
So I would suggest to search for an API that uploads the file and links it to the already existing issue.