The File.isOnline property in the N/file module of SuiteScript indicates whether a file in the NetSuite File Cabinet is available online.
This property is a boolean value and is primarily used to control whether the file can be accessed publicly through a URL.
The isOnline property specifies whether the file is accessible via its URL. When isOnline is set to true, the file can be accessed directly through its URL by anyone who has the link. If isOnline is false, the file is restricted and cannot be accessed directly via a URL by users without appropriate permissions.
This property is useful when managing files that need controlled access, providing an easy way to manage their availability directly from SuiteScript.
let fileObj = file.load(
{
id: fileId
});
fileObj.isOnline = true;
The available without login is checked once the fileObj.isOnline value is set to true.
