Use cached images for new uploads (#925)
This commit is contained in:
parent
6fca83c81b
commit
4515eddbc4
@ -20,7 +20,8 @@ export default function AssetProxy(value, fileObj, uploaded = false, asset) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
AssetProxy.prototype.toString = function () {
|
AssetProxy.prototype.toString = function () {
|
||||||
if (this.uploaded) return this.public_path;
|
// Use the deployed image path if we do not have a locally cached copy.
|
||||||
|
if (this.uploaded && !this.fileObj) return this.public_path;
|
||||||
try {
|
try {
|
||||||
return window.URL.createObjectURL(this.fileObj);
|
return window.URL.createObjectURL(this.fileObj);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user