public static void UploadFile(ImageUploader uploadControl, HttpPostedFile file, string originalName, string newName, out string filePath)
		{
            filePath = string.Empty;

			string path = GetUploadRootPath("ImageUploadRootPath");
            string tempPath = Path.Combine(path + @"Temp\", newName);
			AutoCreateUploadPath(path);

			var beforeArgs = new UploadEventArgs(originalName);
            //uploadControl.OnBeforeUploadFile(beforeArgs);
			file.SaveAs(Path.Combine(path + @"Temp\", newName));
			var afterArgs = new UploadEventArgs(newName);
            //uploadControl.OnAfterUploadFile(afterArgs);

            filePath = tempPath;
		}
Example #2
0
        public static void UploadFile(ImageUploader uploadControl, HttpPostedFile file, string originalName, string newName, out string filePath)
        {
            filePath = string.Empty;

            string path     = GetUploadRootPath("ImageUploadRootPath");
            string tempPath = Path.Combine(path + @"Temp\", newName);

            AutoCreateUploadPath(path);

            var beforeArgs = new UploadEventArgs(originalName);

            //uploadControl.OnBeforeUploadFile(beforeArgs);
            file.SaveAs(Path.Combine(path + @"Temp\", newName));
            var afterArgs = new UploadEventArgs(newName);

            //uploadControl.OnAfterUploadFile(afterArgs);

            filePath = tempPath;
        }