Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. public string Post()
  2. {
  3. HttpPostedFile MyFile = HttpContext.Current.Request.Files["recFile"];
  4. if (MyFile == null)
  5. return null;
  6. return Utils.UploadToServer(file);
  7. }
  8.  
  9. $scope.UploadPictureEx = function()
  10. {
  11. var options = new FileUploadOptions();
  12. options.fileKey="recFile";
  13. options.fileName=$scope.emplyeedata.ImageURI.substr($scope.emplyeedata.ImageURI.lastIndexOf('/')+1);
  14. options.mimeType="image/jpeg";
  15. var params = new Object();
  16. params.value1 = "test";
  17. params.value2 = "param";
  18. options.params = params;
  19. options.chunkedMode = false;
  20. options.httpMethod = "POST";
  21. options.headers = {
  22. Connection: "close"
  23. };
  24. var ft = new FileTransfer();
  25. ft.upload($scope.emplyeedata.ImageURI, "http://XXXX.net/api/Upload/", win, fail, options);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement