on 2024 Nov 10 11:35 PM
Hello FSM experts,
I need advice regarding an issue of converting PNG/JPG attachments to base64 format for integration purposes in SAP FSM. In my current setup, I use business rule to extract an attachment through the Get Attachment API, convert it to base64, and send it to another system via an API call. For the past 3 years, my way has worked fine. However, over the last few days, the base64 conversion has stopped work correctly—it seems to replace characters like 'i' with '/' and possibly more (e.g. MIME-type "iVBOR" (means PNG type) changed to "/VBOR").
At present, I am using JavaScript to handle the conversion directly within the second API call. I would like to ask the community: what methods or practices do you use to convert attachments to base64 in similar scenarios? Are there any reliable alternatives you use and work event these days?
Example of JS conversion to base64 is in attachment.
Thank you in advance for your insights!
Filip
Request clarification before answering.
Solution from SAP Support, use new API to get attachment:
https://eu.fsm.cloud.sap/cloud-attachment-service/api/v1/Attachment/$ {attachment.id}/content?dtos=Attachment.18&account=${account.name}&company=${company.name}
instead of the previous version:
https://eu.coresuite.com/api/data/v4/Attachment/{attachment.id}/content?dtos=Attachment.18&account=${account.name}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.