@@ -97,18 +97,18 @@ const fileObject = new FileUpload(readStream, fileName, totalsize);
97
97
** Initiate the LargefileUploadTask options with Progress Handler and Range Size**
98
98
99
99
``` typescript
100
- const progress = (range ? : Range , extraCallBackParams ? : unknown ) => {
100
+ const progress = (range ? : Range , extraCallBackParam ? : unknown ) => {
101
101
// Handle progress event
102
102
};
103
103
104
- const progressCallBack : Progress = {
104
+ const uploadEventHandlers : UploadEventHandlers = {
105
105
progress ,
106
106
extraCallBackParam , // additional parameters to the callback
107
107
};
108
108
109
109
const options: LargeFileUploadTaskOptions = {
110
110
rangeSize: 327680 ,
111
- progressCallBack: progressCallBack ,
111
+ uploadEventHandlers: UploadEventHandlers ,
112
112
};
113
113
```
114
114
@@ -128,18 +128,16 @@ _You can also use `OneDriveLargeFileUploadTask` which provides easier access to
128
128
Example -
129
129
130
130
``` typescript
131
- const progressCallBack : Progress = {
131
+ const uploadEventHandlers : UploadEventHandlers = {
132
132
progress ,
133
- completed ,
134
- failure ,
135
- extraCallBackParams: true ,
133
+ extraCallBackParam: true ,
136
134
};
137
135
138
136
const options: OneDriveLargeFileUploadOptions = {
139
137
path: " /Documents" ,
140
138
fileName ,
141
139
rangeSize: 1024 * 1024 ,
142
- progressCallBack ,
140
+ uploadEventHandlers ,
143
141
};
144
142
const readStream = fs .createReadStream (` ./fileName ` );
145
143
const fileObject = new StreamUpload (readStream , fileName , totalsize );
@@ -152,7 +150,7 @@ const uploadResult:UploadResult = await uploadTask.upload();
152
150
}
153
151
```
154
152
155
- > Note: The ` OneDriveLargeFileUploadTask.createTaskWithFileObject ` also handles the upload session creation.* *
153
+ > Note: The ` OneDriveLargeFileUploadTask.createTaskWithFileObject ` also handles the upload session creation.\*\ *
156
154
157
155
## We can just resume the broken upload
158
156
0 commit comments