joukevandermaas / saule

JSON API library for ASP.Net Web API 2.
https://joukevandermaas.github.io/saule
MIT License
76 stars 37 forks source link

I can't call method for upload Files #167

Closed tomasjurasek closed 7 years ago

tomasjurasek commented 7 years ago

Hi, I have classic method for upload files. public async Task<IHttpActionResult> UploadFile(){......} UploadFile

But when I use [ReturnsResource(typeof(GlobalFileModelResource))] doesnt works. image

It is some specific settings for IsMimeMultipartContent?

Thanks Tomas

joukevandermaas commented 7 years ago

I think if you use the following overload for ConfigureJsonApi it might work:

ConfigureJsonApi(
    jsonApiConfiguration: new JsonApiConfiguration(),
    overwriteOtherFormatters: false)

If not, that's a bug (in my opinion). Note that to my knowledge, the JSON API spec itself does not mention uploading files and/or multipart content.

tomasjurasek commented 7 years ago

Does not works with these options . The same errors.