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
Proposals
A
Signature
Connection.upload(options)
Module
N/sftp
Returns
void
Governance
100 units
Script types
Server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2016.2
call shapefrom Oracle's parameter table
1objConnection.upload({2    file:      /* file.File, required */,3    filename:  /* string, optional */,4    directory: /* string, optional */,5    timeout:   /* number, optional */6});
Oracle reference for this method
ParameterTypeRequiredDescription
options.filefile.FilerequiredThe file to upload.
options.filenamestringoptionalThe 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.directorystringoptionalThe 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.timeoutnumberoptionalThe 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

No Mynt syntax yet.

Nothing in the language compiles to Connection.upload(options) today. How should it read?

C

Competing syntax for upload, from GitHub Discussions. Select two or more to compare them side by side.

All discussions

Loading proposals from GitHub…

D

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, save and Ref[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?

N/sftp · Connection.upload(options)

Suggest syntax for upload