Vedachalam Mahadevan
03/10/2025, 7:53 AMCeligo AI
03/10/2025, 7:53 AMAI generated answer (using internal Slack threads):The error message you're seeing indicates that the API is expecting an image file in one of the following formats: 'image/jpeg', 'image/png', 'image/gif', or 'image/webp'. However, it seems like you're trying to send a PDF file, which is not one of the accepted formats. If you're trying to send an image that's embedded in a PDF, you'll need to extract the image from the PDF and convert it to one of the accepted formats before sending it. If you're trying to send the PDF itself as an image, that won't work because a PDF is not an image format. In the case of the PDF file, you need to ensure that the PDF content is properly base64 encoded before you try to save it in NetSuite. If the PDF is saved but appears empty, it could be that the base64 encoding is not being done correctly, or that the original PDF data is somehow corrupted. For the JPG image, it seems like the binary data is not being correctly converted to a base64 string. The error message indicates that the data you're trying to write is not in the correct format. You need to ensure that the binary data is correctly converted to a base64 string before you try to write it to the file. In both cases, you might want to double-check the way you're doing the base64 encoding to make sure it's correct. If you're still having trouble, you might want to try using a different method or library for the base64 encoding. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Celigo AI
03/10/2025, 7:53 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828098893
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.824610472
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.824394822
Celigo AI
03/10/2025, 7:53 AM