ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,207 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am using abp vnext and there is a DTO in the api.
const fd = new FormData();
fd.append("file", document.getElementById('file1').files[0]);
$.ajax({
url: '/api/app/merchant/image?Name=s',
type: "POST",
method: "POST",
data: fd,
contentType: false,
cache: false,
processData:false,
success: function (e) {
}
});
there is a IRemoteStreamContent in the api.
but if I upload there is an error:
Deserialization of interface types is not surpported type Volo.Abp.IRemoteStreamContent.
the interface is :
string FileName{get;}
string ContentType{get;}
Stream GetStream();
how to fix it?
your javascript is doing a standard form file post. as for how the server supports this, see abp vendors documentation and ask the question there:
a quick search on their site::