feat: implement authenticated resource handling for image and PDF previews via AuthImage and AuthIframe components
Build and Push Multi-Platform Images / build-and-push (push) Successful in 17s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 17s
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
import { Modal, Input, List, Image, Typography, Space, Pagination, Spin, Button } from 'antd';
|
||||
import { Modal, Input, List, Typography, Space, Pagination, Spin, Button } from 'antd';
|
||||
import { SearchOutlined, CheckOutlined } from '@ant-design/icons';
|
||||
import { paperlessApi } from '../api/paperless';
|
||||
import { getEnv } from '../utils/env';
|
||||
import { AuthImage } from '../utils/auth-resource';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const { Text } = Typography;
|
||||
@@ -88,12 +89,11 @@ export default function DocumentSearchModal({ open, onCancel, onSelect }: Props)
|
||||
>
|
||||
<List.Item.Meta
|
||||
avatar={
|
||||
<Image
|
||||
<AuthImage
|
||||
src={`${getEnv('VITE_API_URL')}/api/paperless/inbox/preview/${doc.id}`}
|
||||
width={80}
|
||||
height={110}
|
||||
style={{ objectFit: 'cover', borderRadius: 4, border: '1px solid #f0f0f0' }}
|
||||
preview={false}
|
||||
/>
|
||||
}
|
||||
title={doc.title}
|
||||
|
||||
Reference in New Issue
Block a user