feat: 1)upload image with type 'heic' 2)change the empty message to ';' for models 3)

This commit is contained in:
Dean-YZG
2024-05-13 16:24:15 +08:00
parent 3513c6801e
commit c10447df79
7 changed files with 76 additions and 56 deletions

View File

@@ -93,14 +93,17 @@ export function createUpstashClient(store: SyncStore) {
}
let url;
if (proxyUrl.length > 0 || proxyUrl === "/") {
let u = new URL(proxyUrl + "/api/upstash/" + path);
const pathPrefix = "/api/upstash/";
try {
let u = new URL(proxyUrl + pathPrefix + path);
// add query params
u.searchParams.append("endpoint", config.endpoint);
url = u.toString();
} else {
url = "/api/upstash/" + path + "?endpoint=" + config.endpoint;
} catch (e) {
url = pathPrefix + path + "?endpoint=" + config.endpoint;
}
return url;
},
};