docs(transfer): example added for Transfer plugin (#349)

This commit is contained in:
Sameera (Sam) 2016-07-23 20:48:55 +10:00 committed by Ibrahim Hadeed
parent 075842d69d
commit cb24876f23

View File

@ -127,6 +127,27 @@ export interface FileTransferError {
*
* // Abort active transfer:
* fileTransfer.abort();
*
* E.g
*
* upload(){
* const fileTransfer = new Transfer();
* var options: any;
*
* options = {
* fileKey: 'file',
* fileName: 'name.jpg',
* headers: {}
* .....
* }
* fileTransfer.upload("<file path>", "<api endpoint>", options)
* .then((data) => {
* // success
* }, (err) => {
* // error
* })
* }
*
* ```
*
*/