Closed aboah closed 5 years ago
Hello,
You can do it like that =>
var response = await client.
PostRequest("City/Image/Add").
AsMultiPartFromDataRequest().
AddFileContent(fileInfo1, "text/plain").
AddFileContent(fileInfo2, "text/plain").
ExecuteAsync<Response>();
If you prefer use byte array the syntax is :
// With 2 byte array content
byte[] byteArray1 = ...
byte[] byteArray2 = ...
await client.PostRequest("MultiPart/Test").
AsMultiPartFromDataRequest().
AddByteArray(byteArray1, "request", "request2.bin").
AddByteArray(byteArray2, "request", "request2.bin")
ExecuteAsync();
Hello Please How can Developers upload files of application/octet-stream with Tiny.RestClient Using Web Api MultipartFormDataStreamProvider
Can you show us a working Example