Answer the question
In order to leave comments, you need to log in
How to send FormData to WCF REST containing file and text?
Hello, actually the question is in the topic, how to send a file with some related data via HTTP to a WCF service? An example of incoming data might look like:
[DataContract]
public class D
{
[DataMember]
public Stream File { get; set; }
[DataMember]
public string Text { get; set; }
}
let formData = new FormData();
formData.append("File", params.circuitFile);
formData.append("Text", fileName);
return this.http.post('http://localhost/CircuitOptimizer.Service/start', formData)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question