umbracoumbraco7

Unable to upload media files on production Umbraco server


So on local I'm able to upload images fine, but on my deployed website I'm unable to upload images to the media content. I receive an "internal 500 error" with the following path in chrome:

POST http://[url]/umbraco/backoffice/UmbracoApi/Media/PostAddFile?origin=blueimp 500 (Internal)

I looked at umbraco logs and saw this: 2015-12-19 00:15:15,234 [P16524/D8/T73] ERROR Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute - Could not acquire actionExecutedContext.Response.Content System.NullReferenceException: Object reference not set to an instance of an object. at Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)

And on the database table dbo.UmbracoLog when I try to upload it creates a new record: id userId NodeId Datestamp logHeader logComment 1885 0 0 2015-12-19 00:15:15.233 New Media 'IMG_3242.jpg' was created

These failed uploads are the only ones with a NodeId of 0. Not sure if that's strange. Any help would be much appreciated.

I'm using Umbraco v7.3.1.


Solution

  • So I did some digging around on this error and found that it may be a very "un" user-friendly error message. The error is coming up as null reference issue, but the real problem is the ASP.net "default" request size stopping uploading of a large image file. Added the following to the web.config and that resolved the issue:

    <system.web>
      <httpRuntime maxRequestLength="204800" executionTimeout="99999"/>
    </system.web>