Skip to content

Commit 94ee01b

Browse files
ericcolemanChristy Henriksson
authored andcommitted
Add route to match older Nuget.Server uploads (#62)
1 parent ddcb106 commit 94ee01b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/NuGet.Server.V2/NuGetV2WebApiEnabler.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ public static HttpConfiguration UseNuGetV2WebApiFeed(this HttpConfiguration conf
5353
constraints: new { httpMethod = new HttpMethodConstraint(HttpMethod.Delete) }
5454
);
5555

56+
config.Routes.MapHttpRoute(
57+
name: "apiv2package_upload",
58+
routeTemplate: "api/v2/package",
59+
defaults: new { controller = oDatacontrollerName, action = "UploadPackage" },
60+
constraints: new { httpMethod = new HttpMethodConstraint(HttpMethod.Put) }
61+
);
62+
5663
config.Routes.MapODataServiceRoute(routeName, routeUrlRoot, oDataModel, new CountODataPathHandler(), conventions);
5764
return config;
5865
}

0 commit comments

Comments
 (0)