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
DEEPU MOHAN
NA
3
622
How to Slit and merge File in ashx before upload
May 17 2017 6:42 AM
am using html file uploader to upload file its working in js and ashx . but last wek i notice a problem when i try to upload a large file its not working, so i try to modify my ashx code i want to split my file as packages and upload it can any one help me how it can acive .
my ashx code is given below
else if (file.ContentType == "application/octet-stream" || file.ContentType == "application/pdf"|| file.ContentType == "application/pdf")
{
fName = IdcGlobal.Agora.Core.Core.InvocationID + Path.GetExtension(file.FileName);
if (HttpContext.Current.Request.Browser.Browser.ToUpper() == "IE" || HttpContext.Current.Request.Browser.Browser.ToUpper() == "INTERNETEXPLORER")
{
string[] testfiles = file.FileName.Split(new char[] { '\\' });
}
fPath = Path.Combine(context.Server.MapPath(string.Format(ConfigurationManager.AppSettings["Site.FileUpload.Path"], Recordtypename)), fName);
file.SaveAs(fPath);
sHost = HttpContext.Current.Request.Url.Host.ToString();
sPort = HttpContext.Current.Request.Url.Port.ToString();
//imageUrl = (sPort != "80" && sHost.IndexOf("localhost") != -1) ? sHost + ":" + sPort : sHost;
imageUrl = string.Format(ConfigurationManager.AppSettings["Site.FileUpload.Path"], Recordtypename) + fName;
imageUrl = imageUrl.Replace("~/", "/");
FileXml = string.Format("<df-xml><file url=\"{0}\" creator=\"8\" creator-ide=\"cws\" title=\"{1}\" content-type=\"{2}\" file-name=\"{3}\" /></df-xml>", imageUrl, ImageTitle, file.ContentType, file.FileName);
context.Response.ContentType = "text/plain";
context.Response.Write(FileXml);
}
Reply
Answers (
0
)
show selected city in dropdownlist in mvc
How to select different View Engine in VS 2015 Community