fix: upload issue on cloud and stage.

This commit is contained in:
ItzNotABug committed 2024-09-24 18:26:13 +05:30
1 parent 205215afe7
commit 4032cb7e95
1 file changed
+2 -4
+2 -4
View File
@@ -1,7 +1,7 @@
import { Client, type Models, Storage } from '@appwrite.io/console';
import { writable } from 'svelte/store';
import { getProjectId } from '$lib/helpers/project';
import { VARS } from '$lib/system';
import { getApiEndpoint } from '$lib/stores/sdk';
type UploaderFile = {
$id: string;
@@ -19,10 +19,8 @@ export type Uploader = {
};
const temporaryStorage = () => {
const endpoint = VARS.APPWRITE_ENDPOINT ?? `${globalThis?.location?.origin}/v1`;
const clientProject = new Client()
.setEndpoint(endpoint)
.setEndpoint(getApiEndpoint())
.setMode('admin')
.setProject(getProjectId());