Create a gist now

Instantly share code, notes, and snippets.

API Routes for Blob Upload and Download
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
config.Routes.MapHttpRoute(
"PostBlobUpload",
"blobs/upload",
new { controller = "Blobs", action = "PostBlobUpload" },
new { httpMethod = new HttpMethodConstraint("POST") }
);
config.Routes.MapHttpRoute(
"GetBlobDownload",
"blobs/{blobId}/download",
new { controller = "Blobs", action = "GetBlobDownload" },
new { httpMethod = new HttpMethodConstraint("GET") }
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment