Copied to clipboard

Flag this post as spam?

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


  • sami 22 posts 104 karma points
    Jan 24, 2013 @ 13:12
    sami
    0

    Display umbracoBytes from uploaded file After upgrade to v4.9.1

    After recently upgrading a site to v4.9.1  it is no longer filling   umbracoBytes, umbracoExtension label.

     

    Any idea?

    Thanks in advance 

  • sami 22 posts 104 karma points
    Jan 24, 2013 @ 13:21
    sami
    100

    This is my umbracoSettings.config

    <imaging>

                <!-- what file extension that should cause umbraco to create thumbnails -->

                <imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>

                <!-- what attributes that are allowed in the editor on an img tag -->

                <allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>

                <!-- automatically updates dimension, filesize and extension attributes on upload -->

                <autoFillImageProperties>

                    <uploadField alias="umbracoFile">

                        <widthFieldAlias>umbracoWidth</widthFieldAlias>

                        <heightFieldAlias>umbracoHeight</heightFieldAlias>

                        <lengthFieldAlias>umbracoBytes</lengthFieldAlias>

                        <extensionFieldAlias>umbracoExtension</extensionFieldAlias>

                    </uploadField>

                </autoFillImageProperties>

            </imaging>

  • sami 22 posts 104 karma points
    Jan 30, 2013 @ 15:20
    sami
    0

    Does anyone have any suggestions about how I might be able to resolve this?  Any advice would be highly appreciated.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 30, 2013 @ 15:25
    Jeroen Breuer
    0

    How do you create the images? The multiple file upload package might not work.

    Jeroen

  • sami 22 posts 104 karma points
    Jan 30, 2013 @ 15:50
    sami
    0

    Hi Jeroen,

    is not multiple file upload package 

  • Martin S 2 posts 22 karma points
    Jun 27, 2013 @ 22:38
    Martin S
    0

    Sami,

    I ran into the same issue earlier today.  I too had created a new document type with a file upload and what previously worked in 4.7.1.1 seemed to be broken when I upgraded to 4.9.1.  I had to step through the Umbraco source code to figure out what the issue was.  In your UmbracoSettings.config, as you pasted earlier, you have the node "uploadField" with alias "umbracoFile."  This will work when uploading items to the Media section, but may not in your regular Content section (especially if you've defined a custom document type that has an Upload property with an alias other than "umbracoFile".).

    You have two options to fix this:

    1) In your "File" property item (from the screenshot above), change the alias field from "file" to "umbracoFile", OR

    2) In your UmbracoSettings.config file, copy the "uploadField" node (and its children) and copy it just beneath the current one, and then change the alias to "file" (this will match what you have in your properties tab for your specific "File" property).

    As an example of #2, here is what I have... (note: the upload property in my document type has an alias "staticFile"):

    <imaging>
               <!-- what file extension that should cause umbraco to create thumbnails -->
               <imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
               <!-- what attributes that are allowed in the editor on an img tag -->
               <allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
               <!-- automatically updates dimension, filesize and extension attributes on upload -->
               <autoFillImageProperties>
                   <uploadField alias="umbracoFile">
                       <widthFieldAlias>umbracoWidth</widthFieldAlias>
                       <heightFieldAlias>umbracoHeight</heightFieldAlias>
                       <lengthFieldAlias>umbracoBytes</lengthFieldAlias>
                       <extensionFieldAlias>umbracoExtension</extensionFieldAlias>
                   </uploadField>

    <uploadField alias="staticFile">
                      <widthFieldAlias>umbracoWidth</widthFieldAlias>
                      <heightFieldAlias>umbracoHeight</heightFieldAlias>
                      <lengthFieldAlias>umbracoBytes</lengthFieldAlias>
                      <extensionFieldAlias>umbracoExtension</extensionFieldAlias>
                  </uploadField>
              </autoFillImageProperties>
          </imaging>

    If you're interested in stepping through code to debug this issue, look at umbraco.cms\businesslogic\datatype\FileHandlerData.cs line 89.

Please Sign in or register to post replies

Write your reply to:

Draft