TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sujeet Raman
864
927
352.9k
How to encode and decode image to base64 to save server
Jul 26 2017 10:20 AM
want to encode the uploaded files to base64 so that I can pass them to the request. The problem is that I'm using Angular 2 with Typescript and I couldn't find any info on how to do that. I found that in Javascript it can be done with canvas but I don't know how could I implement the code in Typescript. Even I need to know how to bind the coming base64 image in html please help me
What I have tried:
I am getting all other json data except base64.I need to bind it as an image.same way I need to post also
my html here, user can upload image here as jpeg
<input type="file" id="taxname" [(ngModel)]="spam.ImageData" class="form-control browse" value="Browse">
while binding am getting base64 only, how to convert this?. with in one API I need to get
<td> <span>{{ m.ImgeData }}</span> </td>
how can I achieve this?
Reply
Answers (
1
)
how to bind base 64 image from a remote API in Angular2
How to post and bind images that coming as BASE64 string