c# - Windows Phone 8.1 MultipartFormDataContent is missing -
why can't use multipartformdatacontent
, streamcontent
?
getting following error:
the type or namespace name 'multipartformdatacontent' not found (are missing using directive or assembly reference?)
here code:
var fileuploadurl = @"http://<ipaddress>:<port>/fileupload"; var client = new httpclient(); photostream.position = 0; multipartformdatacontent content = new multipartformdatacontent(); content.add(new streamcontent(photostream), "file", filename); await client.postasync(fileuploadurl, content) .continuewith((posttask) => { posttask.result.ensuresuccessstatuscode(); });
you have add system.net.http class
using system.net.http
Comments
Post a Comment