UploadFile
Uploads files (for example, 'documents', 'media') to NetSuite, enabling storage and sharing within the platform.
Input
| Name | Type | Description |
| FolderId | String | Unique identifier for the target folder where the uploaded file will be stored in NetSuite. |
| LocalFile | String | Full local file path, including the file name, for the file being uploaded. This field is mandatory if FileData is not provided. |
| FileData | String | Base-64 encoded string containing the entire contents of the file. Use this field when LocalFile is not provided. |
| MediaType | String | Specifies the type of file being uploaded, such as image, PDF, or text.
The allowed values are AUTOCAD, BMPIMAGE, CFF, CONFIG, CSV, EOT, EXCEL, FLASH, FREEMARKER, GIFIMAGE, GZIP, HTMLDOC, ICON, IMAGE, JAVASCRIPT, PGIMAGE, JSON, MESSAGERFC, MISCBINARY, MISCTEXT, MP3, MPEGMOVIE, MSPROJECT, OTF, PDF, PJPGIMAGE, PLAINTEXT, PNGIMAGE, POSTSCRIPT, POWERPOINT, QUICKTIME, RTF, SMS, STYLESHEET, SVG, TAR, TARCOMP, TIFFIMAGE, TTF, VISIO, WEBAPPPAGE, WEBAPPSCRIPT, WOFF, WOFF2, WORD, XMLDOC, XSD, ZIP. The default value is PLAINTEXT. |
| FileName | String | Desired name for the uploaded file in NetSuite. If left blank, the name from LocalFile will be used. Required when FileData is provided. |
| TextFileEncoding | String | Text file encoding format, such as UTF-8 or ASCII. Leave blank if the file is not a text document.
The allowed values are _big5, _gb2312, _gb18030, _iso88591, _macRoman, _shiftJis, _utf8, _windows1252. |
Result Set Columns
| Name | Type | Description |
| InternalId | String | Unique internal identifier assigned to the uploaded file by NetSuite. |
| IsSuccess | String | Indicates whether the file upload operation completed successfully. Returns true for success and false for failure. |
| StatusMessage | String | Detailed message about the operation result. This field may be empty if the upload succeeds without issues. |
| StatusCode | String | Numeric code representing the outcome of the upload operation. This field may be blank if the operation completes without errors. |