ServerResponse.writeFile(options)
Method Description |
Writes a file to the response. |
Returns |
void |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Parent Object |
|
Sibling Object Members |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
required |
A file.File Object that encapsulates the file to be written. |
2015.2 |
|
|
boolean |
optional |
If The default value is |
2015.2 |
Errors
Error Code |
Message |
Thrown If |
---|---|---|
|
Missing a required argument: {param name} |
The |
|
{param name} |
The value input for |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/http Module Script Samples.
// Add additional code
...
serverResponse.writeFile({
file: myFileObj,
isInline: true
});
...
// Add additional code