title: Display image in Background Url from MongoDB using NodeJS and Angular6
body: <p>I have created an image uploader on my site and store the URL in my MongoDB. I used this guide to create my image uploader: <a href="https://appdividend.com/2018/05/25/angular-6-file-upload-tutorial/" rel="nofollow noreferrer">https://appdividend.com/2018/05/25/angular-6-file-upload-tutorial/</a>
  However, when the file is stored in my MongoDB table it is a C:\\fakepath\\ url. When I try to display the url in a background-image url field via ngStyle I get the response:</p>
  
  <pre><code>Cannot read property 'image' of undefined
  </code></pre>
  
  <p>Here is my code for the .html page: </p>
  
  <pre><code>&lt;div class="jumbotron" [ngStyle]="{ 'background-image': 'url(' + post.image + ')'}"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>The rest of the code follows suit to the guide for storing the image.</p>
  
  <p>If there is a way to either modify the url before it is in the MongoDB or to eliminate the C:\\fakepath\\ and just append the end to the ./upload/ folder where the image is stored should work as well. I have tried also just using the {{post.image}} syntax and recieve the same result.</p>