ng2-image-upload icon indicating copy to clipboard operation
ng2-image-upload copied to clipboard

uploadedFiles does not work with images comes from ajax

Open sourov06 opened this issue 8 years ago • 3 comments

I have images in product table. I need to fetch existing images using ajax from API server and then set that into uploadedFiles to show existent images.

If set image file list statically directly without ajax, it is working fine. When I fetch image information using ajax and set them dynamically it is not working.

sourov06 avatar Nov 21 '17 06:11 sourov06

Hello, I am facing the same issue as sourov06, I have been able to implement the uploader and it saves new images correctly. However, I am not able to use the uploadedFiles correctly. I would like to load a page and show the previously uploaded images. If the image URL's are hardcoded or defined in the variable during the ngOnInit stage, it will show the previous images correctly. However, if I try to load it after an asynchronous call to the API it will not. Please refer to my screenshots below: getpropertyapicall html ngoninit populateimages variabledeclarationincomponenet

As you can see, I've tried passing it as an array or as a string. Either way I can only get it to show the previously uploaded images if it was defined in variable initialization or in ngOnInit.

Is the variable I use for the uploadedFiles not bound to the image-upload control?

dbdaidyl avatar Mar 25 '18 23:03 dbdaidyl

I have a same problem. Any ideas?

yacelgad avatar May 09 '18 21:05 yacelgad

same problem...

kevduggan avatar Jun 12 '18 11:06 kevduggan