mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 15:06:50 +08:00
feat: add optional cache busting for image (#12055)
### What problem does this PR solve? Add optional cache busting for image #12003 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -6,13 +6,14 @@ interface IImage {
|
||||
id: string;
|
||||
className?: string;
|
||||
onClick?(): void;
|
||||
t?: string | number;
|
||||
}
|
||||
|
||||
const Image = ({ id, className, ...props }: IImage) => {
|
||||
const Image = ({ id, t, className, ...props }: IImage) => {
|
||||
return (
|
||||
<img
|
||||
{...props}
|
||||
src={`${api_host}/document/image/${id}`}
|
||||
src={`${api_host}/document/image/${id}${t ? `?_t=${t}` : ''}`}
|
||||
alt=""
|
||||
className={classNames('max-w-[45vw] max-h-[40wh] block', className)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user