How To Show Uploaded Images To The Sever Side Once Again In Browser Using MEAN Stack?
I am using MEAN stack to write and app to upload an image, to have a preview of it, and at the same time to upload this image to server(server in Express) and savinig it in MongoDB
Solution 1:
From https://developer.mozilla.org/en/docs/Web/API/FileReader
The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read.
So you are wrongly using it to read files from server
edit
So what you need to do to display the image is to expose the candidate
on scope that drives the view and then in view where you want to display the image
html
<image ng-src="path/to/file/directory/{{candidate.name}}" />
where candidate.name
is name of the image file
Post a Comment for "How To Show Uploaded Images To The Sever Side Once Again In Browser Using MEAN Stack?"