Is it possible to POST an image (e.g., image/jpeg) with system.net.httpPost? There does not seem to be a way to send binary data (only String). If this is not the appropriate function, what is the best way to POST images from Ignition?
It’s a standard installation of JIRA. I am trying to upload an image to their REST API. I have tried serializing to base64 but that does not seem to work with JIRA.
In particular, it looks like JIRA might require not only the file attached as multipart/formdata, but also a custom header(X-Atlassian-Token: no-check) to prevent XSRF attacks.
Thanks for the reply. I ended up using javax.net.ssl.HttpsURLConnection to write multipart/form-data. httplib did not seem to like TLS 1.2. Not easy, but I did eventually get it to work using this as reference: