fix: webapp upload file (#10195)

This commit is contained in:
zxhlyh
2024-11-02 17:03:14 +08:00
committed by GitHub
parent 0066531266
commit dfa3ef0564
2 changed files with 3 additions and 3 deletions

View File

@@ -324,8 +324,8 @@ export const verifyForgotPasswordToken: Fetcher<CommonResponse & { is_valid: boo
export const changePasswordWithToken: Fetcher<CommonResponse, { url: string; body: { token: string; new_password: string; password_confirm: string } }> = ({ url, body }) =>
post<CommonResponse>(url, { body })
export const uploadRemoteFileInfo = (url: string) => {
return post<{ id: string; name: string; size: number; mime_type: string; url: string }>('/remote-files/upload', { body: { url } })
export const uploadRemoteFileInfo = (url: string, isPublic?: boolean) => {
return post<{ id: string; name: string; size: number; mime_type: string; url: string }>('/remote-files/upload', { body: { url } }, { isPublicAPI: isPublic })
}
export const sendEMailLoginCode = (email: string, language = 'en-US') =>