fix(backend-proxy): fix SVGs are not shown (#4206)
This commit is contained in:
parent
f43c8d8648
commit
7e950a2ef4
@ -10,6 +10,7 @@ import {
|
||||
APIError,
|
||||
unsentRequest,
|
||||
UnpublishedEntry,
|
||||
blobToFileObj,
|
||||
} from 'netlify-cms-lib-util';
|
||||
import AuthenticationPage from './AuthenticationPage';
|
||||
|
||||
@ -38,7 +39,8 @@ const deserializeMediaFile = ({ id, content, encoding, path, name }: MediaFile)
|
||||
byteArray[i] = decodedContent.charCodeAt(i);
|
||||
}
|
||||
}
|
||||
const file = new File([byteArray], name);
|
||||
const blob = new Blob([byteArray]);
|
||||
const file = blobToFileObj(name, blob);
|
||||
const url = URL.createObjectURL(file);
|
||||
return { id, name, path, file, size: file.size, url, displayURL: url };
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user