John Phillips
04/30/2026, 8:27 PMCeligo AI
04/30/2026, 8:27 PMAI generated answer (using internal Slack threads):To upload a PDF file to the file cabinet with a RESTlet, you can use the
N/file module and the file.create method in SuiteScript. This method allows you to set the name, fileType, contents, and folder for the file. Optionally, you can also set the file to be online.
Here is a sample code snippet:
javascript
var fileObj = file.create({
name: 'yourfilename.pdf',
fileType: file.Type.PDF,
contents: 'your base64 encoded pdf string',
folder: 'your folder id',
isOnline: false
});
var fileId = fileObj.save();
Please note that when using a RESTlet to upload files, there is a 10MB file size limitation. If your file exceeds this size, you may need to consider other options.
Also, it's important to note that the file cabinet is not supported on the REST API, so you would need to use a RESTlet for this operation.
******
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
04/30/2026, 8:27 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.884826541
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.87841785
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.848388672
Celigo AI
04/30/2026, 8:27 PMJohn Phillips
04/30/2026, 8:28 PMDaniel Patton
05/01/2026, 9:39 AM