Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
How to encode and decode image to base64 to save server
Karthik Kumar
Jul 26 2017 10:20 AM
305
Reply
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?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
how to bind base 64 image from a remote API in Angular2
How to post and bind images that coming as BASE64 string