upload
Uploads a file to the device.
The upload starts when the flow is collected, and is cancelled when the collection is. The upload may be paused, resumed and cancelled using the controller from TransferState.Started.
Parameters
The path of the file on the device.
The data of the file.
The number of packets sent without waiting for the response. Use 1 if the device does not support the window upload.
The alignment of the packets, used when the window capacity is 2 or more. Each packet is trimmed to a size that is a multiple of this value.
Throws
if the upload fails.
Uploads a file to the device, reading it from the given stream.
The upload starts when the flow is collected, and is cancelled when the collection is. The stream is not closed.
Parameters
The path of the file on the device.
The stream to read the file from.
The number of bytes to read from the stream.
Throws
if the upload fails.