mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
Fix ref edit
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
e70a40931b
commit
ade27c830f
@ -58,7 +58,9 @@ const EditForm = forwardRef(
|
||||
const cacheRef = useRef(performance.now());
|
||||
|
||||
const fileURL = get(fileToEdit, ['file', 'url'], null);
|
||||
const prefixedFileURL = fileURL ? prefixFileUrlWithBackendUrl(fileURL) : null;
|
||||
const prefixedFileURL = fileURL
|
||||
? prefixFileUrlWithBackendUrl(`${fileURL}?${cacheRef.current}`)
|
||||
: null;
|
||||
const downloadFileName = createFileToDownloadName(fileToEdit);
|
||||
const mimeType =
|
||||
get(fileToEdit, ['file', 'type'], null) || get(fileToEdit, ['file', 'mime'], '');
|
||||
@ -284,7 +286,7 @@ const EditForm = forwardRef(
|
||||
{isImg ? (
|
||||
<CropWrapper>
|
||||
<img
|
||||
src={`${src}?${cacheRef.current}`}
|
||||
src={src}
|
||||
alt={get(fileToEdit, ['file', 'name'], '')}
|
||||
ref={isCropping ? imgRef : null}
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user