Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string localresponse;
- try
- {
- //this.SaveFileStream(System.Configuration.ConfigurationSettings.AppSettings[fileToPush.FileType].ToString() + "\" + fileToPush.FileName, new MemoryStream(fileToPush.Content));
- if (File.Exists(filePath))
- {
- File.Delete(filePath);
- }
- using (var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write))
- {
- stream.CopyTo(fileStream);
- fileStream.Flush();
- fileStream.Dispose();
- }
- FileInfo info = new FileInfo(filePath);
- ExtractFile(info);
- localresponse = "Successful";
- }
- catch (Exception ex)
- {
- localresponse = ex.Message;
- }
- return localresponse;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement