Hello sir,
I have two codes
First code is for uploading files on the server
Second code is to replace existing file on server
ex
I have uploaded pdf file abc.pdf on server
next time i will do reupload with same file ie, abc.pdf
string path;
HttpPostedFile myFile = fpProposal.PostedFile;
int nFileLen = myFile.ContentLength;
byte[] myData = new byte[nFileLen];
myFile.InputStream.Read(myData, 0, nFileLen);
path = Server.MapPath("SCANNED") + "\\" +"abc.pdf";
if (fpProposal.HasFile)
{
myFile.SaveAs(path);
}
This code is working fine for uploading and replacing/overwriting existing pdf on my local machine.
but if i try same code on server.... Uploading works... but replacing/overwriting doesn't work please help me with these...this is taking too much time.