angularjs - Angular-file-upload how to use -
how can use example: http://nervgh.github.io/pages/angular-file-upload/examples/simple/ upload files on server. use .net web api , angularjs this. in apicontroller call wcf service's methods upload files db. how in example local directory name. file name , size. please explain how works.
my apicontroller method:
[httppost] public attachmentdto createattachment(jobject json) { using (var _client = new dataserviceclient("epdata")) { if (properties.settings.default.domain != "") { _client.clientcredentials.windows.clientcredential.username = properties.settings.default.domain + "\\" + properties.settings.default.login; _client.clientcredentials.windows.clientcredential.password = properties.settings.default.password; } var userid = json["userid"].toobject<guid>(); _client.setcurrentuser(userid); var filepath = json["filepath"].toobject<string>(); var originalfilepath = convert.frombase64string(filepath); var filename = json["filename"].toobject<string>(); var categoryid = json["categoryid"].toobject<guid>(); var result = _client.createattachment(filename, categoryid, data); return null; } }
the question how local file path or array of bites upload on server.
Comments
Post a Comment