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
Shefali Lahariya
NA
257
155.7k
how to send filepath empty to server using filestream IN C#
Dec 22 2017 1:58 AM
Using code this:
but getting error in "
FileStream fs = File.OpenRead(filePath);" /// because file path is empty. so how to call add empty path in form (MultipartFormDataContent).
MultipartFormDataContent form = new MultipartFormDataContent();
FileStream fs = File.OpenRead(filePath);
var streamContent = new StreamContent(fs);
var imageContent = new ByteArrayContent(streamContent.ReadAsByteArrayAsync().Result);
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(jioMeetConstant.tokentype, " " + jioMeetConstant.Accesstoken);
form.Add(new StringContent(grp_name), "grpName");
form.Add(new StringContent(member), "memberList");
form.Add(imageContent, "grpIcon", Path.GetFileName(filePath));
Reply
Answers (
1
)
System.Drawing - Parameter is not valid
is it possible to get word as a control in winforms