Skip to content

Commit

Permalink
chore: crc32
Browse files Browse the repository at this point in the history
  • Loading branch information
1198994985 committed Jan 30, 2024
1 parent 5b93a2b commit 0ec2b01
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 112 deletions.
218 changes: 107 additions & 111 deletions packages/mona-clients/mona-client-web/src/apis/crc32.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/mona-clients/mona-client-web/src/apis/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export async function getDownLoadFileUrl(fileKey: string) {

export async function uploadFileTemporary(file: File) {
if (window.LIGHT_UPLOAD) {
return window.LIGHT_UPLOAD(file);
const crc32Res = crc32(await file.arrayBuffer());
return window.LIGHT_UPLOAD(file, crc32Res);
}
const domain = window.__MONA_LIGNT_APP_DOMAIN_NAME || 'lgw.jinritemai.com';
const appId = window.__MONA_LIGHT_APP_LIFE_CYCLE_LANUCH_QUERY?.appId;
Expand Down

0 comments on commit 0ec2b01

Please sign in to comment.