Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public string Post()
- {
- HttpPostedFile MyFile = HttpContext.Current.Request.Files["recFile"];
- if (MyFile == null)
- return null;
- return Utils.UploadToServer(file);
- }
- $scope.UploadPictureEx = function()
- {
- var options = new FileUploadOptions();
- options.fileKey="recFile";
- options.fileName=$scope.emplyeedata.ImageURI.substr($scope.emplyeedata.ImageURI.lastIndexOf('/')+1);
- options.mimeType="image/jpeg";
- var params = new Object();
- params.value1 = "test";
- params.value2 = "param";
- options.params = params;
- options.chunkedMode = false;
- options.httpMethod = "POST";
- options.headers = {
- Connection: "close"
- };
- var ft = new FileTransfer();
- ft.upload($scope.emplyeedata.ImageURI, "http://XXXX.net/api/Upload/", win, fail, options);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement