diff --git a/ui/src/state/storage/storage.ts b/ui/src/state/storage/storage.ts index 6f32f1b9f3..847a8696b5 100644 --- a/ui/src/state/storage/storage.ts +++ b/ui/src/state/storage/storage.ts @@ -26,7 +26,6 @@ export const useStorage = createState( backend: 'tlon-hosting', tlonHosting: { endpoint: 'http://localhost:8888', - token: 'token', }, s3: { configuration: { diff --git a/ui/src/state/storage/type.ts b/ui/src/state/storage/type.ts index 491827154d..03fba4e603 100644 --- a/ui/src/state/storage/type.ts +++ b/ui/src/state/storage/type.ts @@ -9,7 +9,6 @@ export interface GcpToken { export interface StorageCredentialsTlonHosting { endpoint: string; - token: string; } export type StorageBackend = 's3' | 'tlon-hosting'; diff --git a/ui/src/state/storage/upload.ts b/ui/src/state/storage/upload.ts index 7ba2954190..71c4fba599 100644 --- a/ui/src/state/storage/upload.ts +++ b/ui/src/state/storage/upload.ts @@ -297,7 +297,7 @@ function useS3Client() { const selUploader = (key: string) => (s: FileStore) => s.uploaders[key]; export function useUploader(key: string): Uploader | undefined { const { - tlonHosting: { token }, + tlonHosting: { endpoint }, s3: { configuration: { currentBucket }, }, @@ -306,7 +306,7 @@ export function useUploader(key: string): Uploader | undefined { const uploader = useFileStore(selUploader(key)); useEffect(() => { - if ((s3Client && currentBucket) || token) { + if ((s3Client && currentBucket) || endpoint) { useFileStore.setState( produce((draft) => { draft.uploaders[key] = emptyUploader(key, currentBucket); @@ -321,7 +321,7 @@ export function useUploader(key: string): Uploader | undefined { }) ); }; - }, [s3Client, currentBucket, key, token]); + }, [s3Client, currentBucket, key, endpoint]); return uploader; }