U4-7715 - Update Gallery snippet for ImageCropper instead of the upload in 7.4.0

Created by Douglas Robar 13 Jan 2016, 14:59:38 Updated by Sebastiaan Janssen 15 Jan 2016, 09:19:41

Because 7.4 has replaced the upload control with the ImageCropper, you can't use the umbracoFile property directly to get the path of the image. Now it's a json object. Instead, you have to use umbracoFile.src.

Thus, the \Umbraco\PartialViewMacros\Templates\Gallery.cshtml file need to be updated accordingly. Note the addition below:

...snip...

@helper Render(dynamic item) {

  • @item.Name
  • }

    One last note... because of the capitalization in the json object, you can't follow the normal Razor convention of capitalizing the first letter after a dot. umbracoFile.Src will not work.

    Comments

    Sebastiaan Janssen 13 Jan 2016, 15:07:11

    Ha, you read my mind!


    Sebastiaan Janssen 15 Jan 2016, 09:19:41

    Commit made by '''Sebastiaan Janssen''' on ''2016-01-15T10:19:35+01:00'' https://github.com/umbraco/Umbraco-CMS/commit/0fbc0d5431800cf96592f36da4935698dd9f30a9

    U4-7715 Update Gallery snippet for ImageCropper instead of the upload in 7.4.0

    #U4-7715 Fixed


    Priority: Normal

    Type: Bug

    State: Fixed

    Assignee: Sebastiaan Janssen

    Difficulty: Normal

    Category:

    Backwards Compatible: True

    Fix Submitted:

    Affected versions: 7.4.0

    Due in version: 7.4.0

    Sprint:

    Story Points:

    Cycle: