I have an API web application that has a controller that should files when executed or called.
the localhost url (not real for clicking)
http://localhost:000000/api/home/
The goal is for the URL to look like this:http://localhost:000000/api/home/(somecollectionofoneormorefiles)
How do I pass one or more file collection to this API method?
[HttpGet]public IEnumerable<DocumentMetaData> Get(HttpPostedFileBase _GetFiles) <--- how do I pass a collection of files one or more when called? {// Define your model var Model = new DocumentMetaData(); //Instantiate list of files if (ModelState.IsValid) { // do work with file collection }// end return null; }
I am trying to do this but need your help,,, using files instead of db data -- basically calling the API from the browser application.
http://www.developer.com/net/asp/consuming-an-asp.net-web-api-using-httpclient.html