Skip to content

Commit

Permalink
Use cached images for new uploads (#925)
Browse files Browse the repository at this point in the history
  • Loading branch information
tech4him1 authored and erquhart committed Jan 3, 2018
1 parent 6fca83c commit 4515edd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/valueObjects/AssetProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4515edd

Please sign in to comment.