Skip to content

Commit b125863

Browse files
Sync with dev, TS library update, doc correction. (#432)
* Bump y18n from 3.2.1 to 3.2.2 in /scripts (#412) * Bump y18n from 3.2.1 to 3.2.2 in /scripts Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] <[email protected]> * Bump y18n from 3.2.1 to 3.2.2 in /scripts Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nikitha Chettiar <[email protected]> * Bump y18n from 3.2.1 to 3.2.2 (#411) Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nikitha Chettiar <[email protected]> * Bump y18n from 4.0.0 to 4.0.1 in /samples/browser (#410) Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nikitha Chettiar <[email protected]> * ts update, buff.alloc, update largefle do, audit fix Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent beea121 commit b125863

File tree

7 files changed

+188
-219
lines changed

7 files changed

+188
-219
lines changed

.npmignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
src/
2-
scripts/
2+
scripts/
3+
design/
4+
changelogs/

docs/tasks/LargeFileUploadTask.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,18 @@ const fileObject = new FileUpload(readStream, fileName, totalsize);
9797
**Initiate the LargefileUploadTask options with Progress Handler and Range Size**
9898

9999
```typescript
100-
const progress = (range?: Range, extraCallBackParams?: unknown) => {
100+
const progress = (range?: Range, extraCallBackParam?: unknown) => {
101101
// Handle progress event
102102
};
103103

104-
const progressCallBack: Progress = {
104+
const uploadEventHandlers: UploadEventHandlers = {
105105
progress,
106106
extraCallBackParam, // additional parameters to the callback
107107
};
108108

109109
const options: LargeFileUploadTaskOptions = {
110110
rangeSize: 327680,
111-
progressCallBack: progressCallBack,
111+
uploadEventHandlers: UploadEventHandlers,
112112
};
113113
```
114114

@@ -128,18 +128,16 @@ _You can also use `OneDriveLargeFileUploadTask` which provides easier access to
128128
Example -
129129

130130
```typescript
131-
const progressCallBack: Progress = {
131+
const uploadEventHandlers: UploadEventHandlers = {
132132
progress,
133-
completed,
134-
failure,
135-
extraCallBackParams: true,
133+
extraCallBackParam: true,
136134
};
137135

138136
const options: OneDriveLargeFileUploadOptions = {
139137
path: "/Documents",
140138
fileName,
141139
rangeSize: 1024 * 1024,
142-
progressCallBack,
140+
uploadEventHandlers,
143141
};
144142
const readStream = fs.createReadStream(`./fileName`);
145143
const fileObject = new StreamUpload(readStream, fileName, totalsize);
@@ -152,7 +150,7 @@ const uploadResult:UploadResult = await uploadTask.upload();
152150
}
153151
```
154152

155-
> Note: The `OneDriveLargeFileUploadTask.createTaskWithFileObject` also handles the upload session creation.**
153+
> Note: The `OneDriveLargeFileUploadTask.createTaskWithFileObject` also handles the upload session creation.\*\*
156154
157155
## We can just resume the broken upload
158156

0 commit comments

Comments
 (0)