Hello everyone,
I am trying to create issues with the rest API (Mantis version 2.23.0/ Windows 10) and command lines through curl. It works rather well, but I would like to know the details of the attachments. I can easily add text files (see https://documenter.getpostman.com/view/ ... c11f7501f4), but I would like for my use case to be able to add pictures.
My question is: how to handle the "content" part for, say, a jpg? Or are there other arguments such as the file path?
REST API- picture attachment handling
Moderators: Developer, Contributor
Re: REST API- picture attachment handling
As far as the php fileinfo extension is enabled, the mime type is build-in derived from the content. Something like
should work in that case.
Code: Select all
{ "name": "test.jpg", "content": "<base64encoded_content_of_test.jpg>" }
-
- Posts: 16
- Joined: 30 Jan 2020, 15:07
Re: REST API- picture attachment handling
Thank you for your reply obmsch ! You answered exactly what I needed: I was wondering how would a picture be encoded.