Thursday, 15 July 2010

c# - Post Multipart with text and file -


I am trying to send a file from my app to the webservice, and for this, I have to write a code that this form :

  & lt; Form action = "/ api / v1 / photo.json" method = "post" enctype = "multipart / form-data" & gt; & Lt; Label = "udid" & gt; UIDID: & lt; / Label & gt; & Lt; Input type = "text" name = "udid" id = "udid" value = "web" /> gt; & Lt; Br / & gt; & Lt; Label = "file" & gt; File: & lt; / Label & gt; & Lt; Input type = "file" name = "file" id = "file" /> & Lt; Br / & gt; & Lt; Label for = "movie" & gt; Movie: & lt; / Label & gt; & Lt; Input type = "file" name = "movie" id = "movie" / & gt; & Lt; Br / & gt; & Lt; Input type = "submit" name = "submit" value = "submit" & gt; 

I already have pictures byte [], but all things tried to return me an internal error of 500 : /


No comments:

Post a Comment