fix: upload remote image preview (#9952)
This commit is contained in:
parent
82033af097
commit
78b74cce8e
7 changed files with 50 additions and 33 deletions
|
|
@ -324,9 +324,10 @@ 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 fetchRemoteFileInfo = (url: string) => {
|
||||
return get<{ file_type: string; file_length: number }>(`/remote-files/${url}`)
|
||||
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 sendEMailLoginCode = (email: string, language = 'en-US') =>
|
||||
post<CommonResponse & { data: string }>('/email-code-login', { body: { email, language } })
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue