c# - Handle post (from iOS) with image in asp.net server -
first, question briefly: should write in action parameters handling image sent , how handle data image of it?
what did is:
image in ios converted nsdata (which byte array data if i'm not wrong.
using afnetworking post: strings need in params dict , image data in [formdata appendwith...].
on server side, how should action like? it's:
public jsonresult handledata (string x, string y, ???????????) {} the strings come parameters dictionary need image data , reverse real image?
thank in advance!
so.. solution simple use in httppostedfilebase.
just added parameter method (httppostedfilebase file) , then:
if (file.contentlength > 0) { var filename = path.getfilename(file.filename); var path = path.combine(server.mappath("~/content/images"), filename); file.saveas(path); } hope useful poeple me drowning in more complex solution out there...
Comments
Post a Comment