uploading a generated pdf file
Geert
Geert at royalbotania.com
Thu May 8 06:28:31 UTC 2025
Hi,
Now that we can catch the $pfdcomplete in the remote task (check the archives this week) it's time to upload a pdf file using REST api
Have done this in the past by encoding base64 the binary content and have a character string within the body part of all other tags (attachment of an invoice).
POST /api/rest/v1/asset-media-files
As described by https://api.akeneo.com/api-reference.html#post_asset_media_files
The additional example I received from support shows a tab (I presume Postman) of type form-data with key = "file" and value = a file dragged from the operating system
So this is not part of the header (where Bearer Authorization and Content-type resides)
The Body should be
File (string/binary)
How does that POST translate to a JSON built from O$ ?
Do I need to create a fictive schema class with 2 columns file and value ?
Kind regards,
Geert
More information about the omnisdev-en
mailing list