mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 11:26:52 +08:00
feat: custom webapp logo (#1766)
This commit is contained in:
@@ -297,7 +297,7 @@ const baseFetch = <T>(
|
||||
]) as Promise<T>
|
||||
}
|
||||
|
||||
export const upload = (options: any, isPublicAPI?: boolean): Promise<any> => {
|
||||
export const upload = (options: any, isPublicAPI?: boolean, url?: string): Promise<any> => {
|
||||
const urlPrefix = isPublicAPI ? PUBLIC_API_PREFIX : API_PREFIX
|
||||
let token = ''
|
||||
if (isPublicAPI) {
|
||||
@@ -318,7 +318,7 @@ export const upload = (options: any, isPublicAPI?: boolean): Promise<any> => {
|
||||
}
|
||||
const defaultOptions = {
|
||||
method: 'POST',
|
||||
url: `${urlPrefix}/files/upload`,
|
||||
url: url ? `${urlPrefix}${url}` : `${urlPrefix}/files/upload`,
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user