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
mari muthu
NA
198
107.5k
Check base64 string(image) type using C#
Jun 2 2017 9:43 AM
hi,
Actually my application i have the upload image functionality there i have passed one parameter(base64string) to my controller. here i want to check the base64string type . i tried one way but that was wrong if anybodys know please tell me that answer .
i need to change this line . how to check the type inside that string ,
<pre> string x = base64image.Replace("data:image/png|tiff|jpg|gif;base64,", "");</pre>
this is my code,
public bool LoadImage([FromBody]string base64image)
{
string x = base64image.Replace("data:image/png;base64,", "");
byte[] data = System.Convert.FromBase64String(x);
MemoryStream ms = new MemoryStream(data);
Image img = Image.FromStream(ms);
return false;
}
Reply
Answers (
1
)
read word document(doc,docx) content to a string
Do not want to see the time in itextsharp report