Copied to clipboard

Flag this post as spam?

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


  • Raj 1 post 71 karma points
    Sep 19, 2018 @ 11:54
    Raj
    0

    Can't upload png media files

    Just recently we noticed that not able to upload png files - Umbraco returns Page Not Found when they try to save the new media type. I'm able to open the file in an image editing program and everything is fine but when uploading in Umbraco image was not shown.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Sep 20, 2018 @ 05:35
    Jan Skovgaard
    1

    Hello Raj and welcome to the forum :)

    How large are these .png files for instance? Either files with the .png extension has been disallowed for some reason or they're too large byte wise that you either need to trim them before uploading or increase the upload limit.

    To check if the issue is caused by the .png file type being disallowed go to the /config/umbracoSettings.config and check the content of the <disallowedUploadFiles> element. If it contains "png" in this line. Then you'll need to remove it and recycle the app pool for the change to take effect.

    Normally .png file are allowed out of the box so I doubt that this is the issue but worth checking since someone working on the project could have changed it unless you're the only one working on the project of course :)

    In order to increase the upload limit go to this element in the web.config in the root of the Umbraco folder.

    <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" maxRequestLength="153600" />
    

    In this example above the size limit is set to 150Mb. By default it's set to around 4Mb if I remember correctly.

    The example is from Jeavon Leopold's article here https://24days.in/umbraco-cms/2013/6-easy-configuration-tweaks/ which also contains 5 other useful config tips so it's worth a read :)

    If increasing the file size does not help then check that the png's are not larger than this limit. If so you should consider shrinking the files before uploading them.

    I hope this helps!

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft