Skip to content

Commit 01cdea0

Browse files
SauravKanchanmmjeedependabot[bot]
authored
Hotfix/update tus (#23)
* v0.1.3 (#9) * update test cases * Rename Arcana as StorageProvider during export in index.ts (#5) * Revert "Rename Arcana as StorageProvider during export in index.ts" (#6) * Rename Arcana as StorageProvider during export in index.ts * Revert "Rename Arcana as StorageProvider during export in index.ts (#5)" This reverts commit bb0e51f. * update Readme * 0.1.1 * Fix module resolution errors (#8) Diagnosis: Webpack can't somehow handle UMD modules, so when TypeScript was configured to generate UMD modules, Webpack could no longer bundle them correctly, even if it emitted no errors. * 0.1.2 * 0.1.3 Co-authored-by: mmjee <root@git.maharshi.ninja> * Bump url-parse from 1.5.1 to 1.5.4 (#10) Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.4. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](unshiftio/url-parse@1.5.1...1.5.4) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump follow-redirects from 1.14.3 to 1.14.7 (#11) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.3 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.14.3...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update tus Co-authored-by: mmjee <root@git.maharshi.ninja> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent e929e7d commit 01cdea0

File tree

3 files changed

+23
-28
lines changed

3 files changed

+23
-28
lines changed

package-lock.json

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"eth-crypto": "^1.9.0",
6161
"eth-sig-util": "^3.0.1",
6262
"ethers": "^5.3.1",
63-
"tus-js-client": "^2.3.0",
63+
"tus-js-client": "^2.3.1",
6464
"tweetnacl": "^1.0.3"
6565
},
6666
"directories": {

src/fileReader.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import readAsByteArray from 'tus-js-client/lib/browser/readAsByteArray';
21
import Encryptor from './encrypt';
32

43
class FileSource {
@@ -13,16 +12,12 @@ class FileSource {
1312
}
1413

1514
async slice(start, end) {
16-
if (false) {
17-
return readAsByteArray(this._file.slice(start, end));
18-
}
19-
2015
let value = this._file.slice(start, end);
2116
const en = new Encryptor(this.key, start);
2217
return value.arrayBuffer().then((buffer) => {
2318
return en.encrypt(buffer).then((d) => {
2419
value = new Blob([d]);
25-
return { value };
20+
return { value, done: true };
2621
});
2722
});
2823
}

0 commit comments

Comments
 (0)