Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

API Web method get collection of files....

$
0
0

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<DocumentMetaDataGet(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


Viewing all articles
Browse latest Browse all 4850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>