Barry
05/05/2023, 5:23 PMIf the file type is binary (for example, PDF), the file content must be base64 encoded.If I pass the file base64 encoded and load it in a restlet, it is unviewable on netsuite side. Any ideas here?
Barry
05/05/2023, 5:24 PMBarry
05/05/2023, 5:24 PMbattk
05/05/2023, 5:27 PMBarry
05/05/2023, 5:29 PMelse if (context.type === 'file') {
// NOTE: the name has to be unique!
const fileRecord = file.create({
name: context.contents.name,
fileType: context.contents.type,
contents: context.contents.contents,
folder: context.contents.folder_record_id,
});
recordIds.push(fileRecord.save())
}
context is the incoming json objectbattk
05/05/2023, 5:30 PMbattk
05/05/2023, 5:30 PMBarry
05/05/2023, 5:31 PMBarry
05/05/2023, 5:31 PMBarry
05/05/2023, 5:46 PMBarry
05/05/2023, 5:48 PMtype: "pngimage"
is not the same as type: file.Type.PNGIMAGE
which in previous experimentation in other places worked.