fix and update

This commit is contained in:
lendry
2026-06-30 19:47:26 +03:00
parent d41c9d1121
commit 6ee3ffe0a5
6 changed files with 57 additions and 11 deletions

View File

@@ -4,6 +4,7 @@ import * as React from 'react';
import { Loader2, Trash2 } from 'lucide-react';
import { useAuth } from '@/components/id/auth-provider';
import { fetchDocumentPhotoUrl } from '@/lib/api';
import { resolveBrowserMediaUrl } from '@/lib/resilient-media-fetch';
import { DocumentFullscreenViewer, DocumentPhotoThumbnail } from './document-photo-viewer';
interface DocumentPhotoGalleryProps {
@@ -33,7 +34,7 @@ export function DocumentPhotoGallery({ userId, token, storageKeys, readOnly, onR
storageKeys.map(async (storageKey) => {
try {
const response = await fetchDocumentPhotoUrl(userId, storageKey, token);
return { storageKey, accessUrl: response.accessUrl };
return { storageKey, accessUrl: resolveBrowserMediaUrl(response.accessUrl) };
} catch {
return { storageKey, accessUrl: '' };
}