Hi everyone I've situation while uploading image in Angular project if user doesn't select image then i want to read image from the assets folder and send it to backend. after hours of trial and error. i'm not able to read the image from the asset folder to a JavaScript file object. if anyone knows please guide to me. Thanks in advance.
Things i've tried
- I've tried to fetch it using HttpClient in Angular by passing relative path.
- I've tried to create file object by passing relative path to File(url); constructor with no luck.
please help me.
My problem is to create a file object by accessing the image from asset folder in the angular(4/5) project.