Use cached images for new uploads (#925)

This commit is contained in:
Caleb 2018-01-03 14:47:33 -07:00 committed by Shawn Erquhart
parent 6fca83c81b
commit 4515eddbc4

View File

@ -20,7 +20,8 @@ export default function AssetProxy(value, fileObj, uploaded = false, asset) {
}
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 {
return window.URL.createObjectURL(this.fileObj);
} catch (error) {