How can I add an image attachment by URL via API (post)?
Hi, in the API documentation, there's 'local:' (file) param only. How can I add an attachment by URL?
https://developers.meistertask.com/reference/post-attachment
By the way, unlike other API examples (GET/POST), the 'try-it' on the page never succeeded (400). I used Chrome and a PNG file.
Best Answer
-
I'd like to update this thread here with confirmation from the team - Right now, it's not possible to attach files using URL via MT API.
If you'd like to submit a feature request, please head over to the feature request category and post your idea there.
0
Answers
-
Hey @anemochore,
Thanks for reaching out.
I've just confirmed this with our devs. The best way would indeed be to use a local file. However, it is possible to enter a URL in the browsing bar. This downloads the picture and saves it to INetCache automatically. Based on this, it should work.
I hope this helps.
Best,
Miša
0 -
Hi, Miša Hennin. Since what you're talking is not related to API, please tell devs this:
Getting attachment is fine.
curl --request GET --url https://www.meistertask.com/api/tasks/<taskId>/attachments --header "Authorization: Bearer <pea>" --header "accept: application/json" --header "content-type: application/json"
Please replace <taskId> and <pea> to whatever appropriate. The result is 200 with correct JSON. But POST never works. This is minimal curl query you can test (I modified the exmaple on the doc):
curl --request POST --url https://www.meistertask.com/api/tasks/<taskId>/attachments --header "Authorization: Bearer <pea>" --header "accept: application/json" --header "content-type: application/json" --data "{ ""local"": ""data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII""}"
The data used is one of the smallest b64 images (
). The result is 400 with error message: "Parameter local should be of type ActionDispatch::Http::UploadedFile!"Additionally, I really want you to add a feature allowing use of URL instead of local file.
0 -
Hi @sangbok lee,
I have forwarded your request to support. They will be able to take a closer look and will be in contact with you via email shortly.
If you'd like to submit a feature request, please head over to the feature request category and post your idea there.
Best,
Miša
0
Free Online Courses:
Categories
- All Categories
- 11 MeisterNote
- Deutsch
- English
- 34 Roadmap und Feature-Board
- Ankündigungen
- YouTube-Tutorials ansehen
- Erfolgsgeschichten lesen
- MeisterTask Academy
- Vorlagen
- Anwendungsfälle
- Help Center
- 14 Feature Roadmap
- 2 Announcements
- 2 Inspiration Hub
- 41 Ask the Community
- 47 Frag die MeisterTask-Community
- 2K MindMeister Community
- 1.3K MeisterTask
- Ask a Question
- Community auf Deutsch
- 522 MeisterTask - DE
- 112 Community Central