Connection object method · N/sftp
upload()
Connection.upload(options)
Uploads a file to the remote FTP server.
- Implementation
- Not started
- Design
- Open for proposals suggest how it should read
A
suitescript api
1objConnection.upload({2 file: /* file.File, required */,3 filename: /* string, optional */,4 directory: /* string, optional */,5 timeout: /* number, optional */6});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.file | file.File | required | The file to upload. |
| options.filename | string | optional | The name to give the uploaded file on server. By default, the filename is the same specified by options.file . Note: Illegal characters are automatically escaped. |
| options.directory | string | optional | The relative path to the directory where the file should be upload to. By default, the path is set to the current directory. Important: This input must take the form of a relative path. |
| options.timeout | number | optional | The number of seconds to allow for the file to upload. By default, this value is set to 300 seconds. Important: This parameter does not specify the overall timeout limit. The value is only applied when no data is received within the specified period. |
B
mynt syntax
No Mynt syntax yet.
Nothing in the language compiles to Connection.upload(options) today. How should it read?
C
community proposals
Competing syntax for upload, from GitHub Discussions. Select two or more to compare them side by side.
Loading proposals from GitHub…
D
suggest an alternative
Write the Mynt you wish you could write.
A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.
- Clarity. Does it say what happens, without ceremony?
- Consistency. Does it read like
load,saveandRef[field]? - Expressiveness. Does it cover the cases people actually write?
- Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?