Skip to content

Commit

Permalink
fix(legacy): failed to upload avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
uonr committed Dec 21, 2023
1 parent 841fb78 commit abeac25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/legacy/src/api/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export function get<Q extends object, T>(path: string, query?: Q): Promise<AppRe

export function editAvatar(file: Blob, filename: string, mimeType: string): Promise<AppResult<User>> {
const path = '/users/edit_avatar';
return request(makeUri(path, { filename, mimeType }), 'POST', file, mimeType);
return request(makeUri(path, { filename, mimeType, size: file.size }), 'POST', file, mimeType);
}

export function upload(
Expand Down

0 comments on commit abeac25

Please sign in to comment.