ANGULAR 4 Base64 Upload Component
问题 I am new to Angular. I am using Angular 4. Where there is a requirement to send the base64 Image as one of the model member to the web api. Is there a Angular component or directive for the that would bind the base64 to the said model? Appreciate and Thank you for the help. 回答1: You can upload image and store it as base64 encoded. In your template add this <div class="image-upload"> <img [src]="imageSrc" style="max-width:300px;max-height:300px"/> <input name="imageUrl" type="file" accept=