Copied to clipboard

Flag this post as spam?

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


  • Lesley 107 posts 349 karma points
    Mar 01, 2018 @ 01:28
    Lesley
    0

    Can't upload png media files

    We have a v6.1.6 site which has been running for a while now. Just recently our clients have advised us that they can no longer upload png files - Umbraco returns Page Not Found when they try to save the new media type.

    We are using the "Upload field" property editor for the image upload.

    This is the error from the log file:

    2018-03-01 12:39:06,359 [21] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 29] An unhandled exception occurred
    System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
       at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
       at Umbraco.Core.IO.UmbracoMediaFile.GenerateThumbnail(Image image, Int32 maxWidthHeight, Int32 fileWidth, Int32 fileHeight, String thumbnailFileName, Boolean useFixedDimensions)
       at Umbraco.Core.IO.UmbracoMediaFile.DoResize(Int32 width, Int32 height, Int32 maxWidthHeight, String fileNameAddition)
       at Umbraco.Core.IO.UmbracoMediaFile.Resize(Int32 maxWidthHeight, String fileNameAddition)
       at umbraco.cms.businesslogic.datatype.FileHandlerData.set_Value(Object value)
       at umbraco.editorControls.uploadField.Save()
       at umbraco.controls.ContentControl.SetNameAndDataTypeValues()
       at umbraco.controls.ContentControl.SaveClick(Object sender, ImageClickEventArgs e)
       at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
       at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.HandleError(Exception e)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    

    Any ideas what could be causing the problem?

    I can load png files on my local version of the site but both the test and production sites error...

  • Steve Morgan 1349 posts 4459 karma points c-trib
    Mar 01, 2018 @ 10:28
    Steve Morgan
    0

    That looks like the kind of error you get when you run out of disk space?!

  • Lesley 107 posts 349 karma points
    Mar 01, 2018 @ 21:40
    Lesley
    0

    Test server has 6GB free space, production server has 18GB

  • Lesley 107 posts 349 karma points
    Mar 01, 2018 @ 21:43
    Lesley
    0

    jpg files load correctly, but png and gif files error

  • Steve Morgan 1349 posts 4459 karma points c-trib
    Mar 02, 2018 @ 09:31
    Steve Morgan
    0

    Almost certainly not this but what's the setting in the \config\UmbracoSettings.config for disallowedUploadFiles

    <disallowedUploadFiles>ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,svg,php,htaccess</disallowedUploadFiles>
    
  • Lesley 107 posts 349 karma points
    Mar 05, 2018 @ 19:38
    Lesley
    0
    <disallowedUploadFiles>ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd</disallowedUploadFiles>
    

    also

      <imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
    
  • Nigel Wilson 945 posts 2077 karma points
    Mar 05, 2018 @ 19:56
    Nigel Wilson
    0

    Hi Lesley

    Just a random idea, but maybe worth a shot.

    Are you able to open the file in an image editing program, save it as a different filename and try uploading the new file ?

    Cheers

    Nigel

Please Sign in or register to post replies

Write your reply to:

Draft