0

Does aspnetboilerplate provide the ability in the application layer to upload a file and have SWAGGER available to test the upload?

I can do this via MVC but can not get aspnetboilerplate (IApplicationService) to accept a file upload

Obsidian Age
  • 41,205
  • 10
  • 48
  • 71
Ivan Sager
  • 175
  • 1
  • 2
  • 12
  • 1
    Possible duplicate of [How do you do File Upload method in AppServices for aspnetboilerplate?](https://stackoverflow.com/q/46294091/8601760) – aaron Jul 19 '19 at 01:30
  • @ivan-sager did it solved ?! – Mahyar Mottaghi Zadeh Jul 20 '19 at 12:28
  • So I tried most of the options I found online including the sql table you mentioned and none of them worked... But I am glad to say that I've managed to get a file posted using the interface from the ABP application layer and used IOperationFilter for my Swagger to work >> The method is Task CreateFracPadPlan(CreateFracInput input, [FromForm]IFormFile file). So long story short it took a bit of work but I have a working version uploading excel with the regular ABP application layer --basically just taking advantage of abp dynamic API functionality – Ivan Sager Jul 21 '19 at 22:13
  • @IvanSager Post that as an answer or delete the question. – aaron Dec 28 '19 at 09:57

1 Answers1

0

There is no way post a file directly to ApplicationService, but the possible way to create an upload action in MVC which uploads the file in a directory and returns a uniqueidentifier, then the uniqueidentifier can be passed to the application service that can find the file in the directory.

Mahyar Mottaghi Zadeh
  • 1,178
  • 6
  • 18
  • 31