3
votes

we recently upgraded from Sitecore 7.2 initial version to the SP2 one. The upgrade went fine and everthing seemed to be working. However, we noticed that when trying to upload files through the (new) media library, the upload never finishes. I can see a 404 request to http://xx/api/sitecore/media/upload in the console, but I can't figure out what is missing. I have checked that I have the correct dll versions, and also use fresh config files for Sitecore.ItemWebApi.config.

The upgrade went fine and I have republished/reindexed everything.

Does anyone have any hints on what could be missing?

1
do you have any error on logs file? - Vlad Iobagiu
Do you have any custom 404 handlers in your solution? It may not be ignoring the api path correctly. - jammykam
@SitecoreClimber No error, but a debug line saying: DEBUG Unable to parse product url 'xxxx/api/sitecore/Media/Upload'. - Daniel Hallqvist
@jammykam No custom 404 handlers. It goes to the standard sitecore 404 page "The requested document was not found" - Daniel Hallqvist
I suggest you to open a support ticket. - Vlad Iobagiu

1 Answers

1
votes

If you have created custom routes or WebAPI, change your custom API route defination from api to xxxapi or anyother name as you need. Because Sitecore has it's own API which has /api/ as route and if you create custom routes with same name, Sitecore's request will go to custom api route not to Sitecore's one.

config.Routes.MapHttpRoute("DefaultApi", "api/{controller}/{action}/{id}",
           new { id = RouteParameter.Optional });

Change to

config.Routes.MapHttpRoute("DefaultApi", "xxxapi/{controller}/{action}/{id}",
           new { id = RouteParameter.Optional });