Modules
Objects/Functions
SuiteScript 2.0
{File}.size{READ_ONLY_PROPERTY: {}})
N/file Module
File.size
Property Description:
The size of a file in bytes.
This property is read-only.
You can use this value to determine if the file is within size limits for File.getContents(). Size will reflect any lines you have streamed into a file. For example, the original file size plus lines appended.
Type:
number
Supported Script Types:
Server-side scripts
For more information, see SuiteScript 2.0 Script Types.
Module:
N/file Module
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=File.size
Example:
// Code Example 1
//Add additional code
//...
var fileObj = file.load({
id: 'Images/myImageFile.jpg'
});
log.debug({
details: "File Size: " + fileObj.size
});
//...
//Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4229266796.html