Web Worker Sign Out and Use Go API (#13)

* Calculate checksum and send with file upload

* Limit file upload and display rejected file error

* Add sign in timeout

* Check auth token structure before setting
Clean up

* Use web worker timer to sign out
Remove checksum
Point to Go ota update

* Remove checksum dependency
This commit is contained in:
John Wu
2021-02-08 15:23:36 -08:00
committed by GitHub
parent 1ddf9fe813
commit e1f0006d5e
13 changed files with 1630 additions and 2173 deletions

View File

@@ -0,0 +1,12 @@
const timer = {
start: jest.fn(),
stop: jest.fn(),
onMessage: jest.fn(),
terminate: jest.fn()
}
const getTimerWorker = () => {
return timer;
}
export default getTimerWorker;

View File

@@ -11,7 +11,7 @@ export const getCancelToken = () => {
return issuedCancelToken;
}
export const uploadFile = async (file, token, onProgress, cancelToken) => {
export const uploadFile = async (file, token, onProgress, cancelToken, hash) => {
if (!uploadFileDelay) return uploadFileResponse;
onProgress(50);
await delay(10000);