Copied to clipboard

Flag this post as spam?

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


  • Danny Winbourne 33 posts 54 karma points
    Feb 29, 2012 @ 09:31
    Danny Winbourne
    0

    Strange behaviour with media

     

    We are still developing our site, so some people are loading content from their local instance, whilst others are loading on the staging box, but both are sharing the same Umbraco database.

    I am using Umbraco 4.7.1.1

    We have encountered an issue where if someone changes the "Name" of a media item on their local machine, the change doesn't reflect on the other instances, until you go to that specific media item, and save and publish.

    You can get the correct images though, but the "Name" filed shows the previous value.

    For content, you have "Republish entire site", but there isn't an option for this on media.

    Now, the reason I need access to the "Name" field is because of how I use images in my site.

    I have created a custom media type called "Image Folder", under which I create images named "Desktop", "Tablet", and "Mobile". Custom code then copies the image just uploaded to the parent media folder, renaming it based on the Image Folder Name field (it copies the file from the physical media folder to the parent folder, i.e. \media\1427 to \media\1426).

    If someone renames the Image folder, you need to resave each image below to get the correctly named images in the folder (I haven't got round to writing code to do this yet).

    So, you could get a situation where someone has renamed the "Image Folder", and updated all the images so they have the correct name. I then update to get the latest content, and republish the content. I could view the folder in windows, and see the correct images with the correct file names. However, I use the Image folder name to construct my final file name.

    For example, I may have an image folder named "homepage_image1". If I wanted the desktop version, I look for "homepage_image1_d.jpg", in the media directory of the image folder.

     

     

  • Danny Winbourne 33 posts 54 karma points
    Mar 03, 2012 @ 16:34
    Danny Winbourne
    0

    Anyone able to help?

Please Sign in or register to post replies

Write your reply to:

Draft