Hi,
I want to upload images in FTP folder with new image size
But It would not save image correctly!
Would you please help me?
private bool UploadToFTP(string strFTPFilePath, Stream fileStream, string strUserName, string strPassword)
{
try
{
//Create a FTP Request Object and Specfiy a Complete Path
System.Net.FtpWebRequest reqObj = (FtpWebRequest)WebRequest.Create(strFTPFilePath);
//Call A FileUpload Method of FTP Request Object
reqObj.Method = WebRequestMethods.Ftp.UploadFile;
//If you want to access Resourse Protected,give UserName and PWD
reqObj.Credentials = new NetworkCredential(strUserName, strPassword);
// Resize Image is function to resize the image
System.IO.Stream img1 = ResizeImage(fileStream, 100);
// Copy the contents of the file to the byte array.
byte[] fileContents = new byte[img1.Length];
fileStream.Read(fileContents, 0, (int)fileStream ...
Go to the complete details ...