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
John
NA
928
131.9k
Upload file using WebClient
Sep 22 2017 6:45 AM
Stream stream = file.InputStream;
file.SaveAs(physicalPath);
BinaryReader b = new BinaryReader(file.InputStream);
byte[] fileData = b.ReadBytes(file.ContentLength);
var wc = new WebClient();
wc.Headers.Add("Authorization", "Bearer "+ AccessToken);
byte[] response = wc.UploadData(url, "PUT", fileData);
string s = wc.Encoding.GetString(response);
var obj = JObject.Parse(s);
Above code is not working with Large Files
In web.config i have updated
<httpRuntime maxRequestLength="1048576" />
still not working
Reply
Answers (
3
)
How to Set Sr. No 1 in each month of attendance.
Use of ToolTip in ASP .NET