Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. [WebMethod]
  2. public string UploadFile(byte[] f, string fileName)
  3. {
  4. try
  5. {
  6. MemoryStream ms = new MemoryStream(f);
  7. FileStream fs = new FileStream("http://103.16.141.197/ProBuildIndia/Operator/Sample/" + fileName, FileMode.Create);
  8. ms.WriteTo(fs);
  9. ms.Close();
  10. fs.Close();
  11. fs.Dispose();
  12. return "OK";
  13. }
  14. catch (Exception ex)
  15. {
  16. return ex.Message.ToString();
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement