Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yahya Muhammad 1 post 71 karma points
    Jan 09, 2017 @ 07:51
    Yahya Muhammad
    0

    Error when uploading new media

    I was using Umbraco version 7.4.3 for my client's company profile website with blog post functionality. A blog post need to include images in its content body, so I uploaded it as Media node in umbraco. At first it works well, anyone with permission could upload new media either via main menu (on the left) or within wysiwyg editor toolbar. Update: I also use one of uskinned theme.

    Then my client told me they were unable to add new images. I looked it up and this was my attempt uploading new image from editor: screenshot

    If we look at returned response, it says (omitted):

    Value cannot be null. Parameter name: HttpContext", "ExceptionType":"System.ArgumentNullException","StackTrace":" at System.Web.HttpContextWrapper..ctor(HttpContext httpContext) at Umbraco.Web.SingletonHttpContextAccessor.get_Value() at Umbraco.Web.RequestLifespanMessagesFactory.Get() at Umbraco.Core.Services.MediaService.Umbraco.Core.Services.IMediaServiceOperations.Save(IMedia media, Int32 userId, Boolean raiseEvents) at Umbraco.Web.Editors.MediaController.d__1b.MoveNext() --- End of stack trace from previous location where exception was thrown ---
    

    After digging into source code of umbraco, I assumed the HttpContext.Current used is returning null when serving PostAddFile. All references I read said it can only be null if the thread processing is not the main thread or is a background process, thus didn't have HttpContext present. My knowledge on how Umbraco works is limited, I have no idea why just now it didn't work like it used to be.

    I couldn't think of any solution other than trying re-install it and migrate all data and modification, which is a costly solution I try to avoid if possible. Do anyone have suggestion on this problem? thanks

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies