Copied to clipboard

Flag this post as spam?

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


  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Mar 04, 2012 @ 19:06
    Bjarne Fyrstenborg
    0

    Avoid Danish character in image url

    Hi..

    I am using Cloud Zoom plugin for viewing product images, where I add thumbnails if more than one image is added to the product.

    But when the uploaded image contains Danish characters, æ ø and å, it just open the image in the browser window instead of view it in the image place.

    Here is an example where the uploaded images doesn't contain any special character: http://sub.ak-security.dk/da/shop/lygter/pandelampe-h14.aspx ... and here an example where the images contains å: http://sub.ak-security.dk/da/shop/haandjern-plus-tilbehoer/haandjernstaske-dobbelt.aspx

    Is there a way I can replace å with aa or ensure that the image url doesn't contain any special character no matter which name the uploaded image has?

    Bjarne

  • Asif Malik 203 posts 339 karma points
    Mar 06, 2012 @ 17:38
    Asif Malik
    0

    I would look to wire into the Umbraco save event and rename the image then

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Mar 17, 2012 @ 13:11
    Bjarne Fyrstenborg
    0

    Should I change something where Umbraco saves the image or how can I fix this?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 17, 2012 @ 21:20
    Jan Skovgaard
    0

    Hi Bjarne

    Hmm, how do you upload the images into Umbraco?

    I just made a local test where I did this

    1. Uploaded an image containing "å" where I created the image node manually inside Umbraco naming the node "håndjerntaske". Then I uploaded the image from the disk. When doing it this way the "å" seems to be replaced with an underscore so the filename was "h_ndjerntaske".
    2. When I uploaded using the desktop media uploader the node created was also automatically named "håndjerntaske" and the image was also named "håndjerntaske".

    So it seems that if doing manual uploads special chars are being rewritten and if using the DMU they're not.

    Doesn't seem that it's something that can be changed in the DMU config...so perhaps try to ask Matt Brailsford if he has a workaround or something in the DMU forum if you get the same test-results as I have gotten above.

    Hope this helps in some way :)

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 17, 2012 @ 21:22
    Jan Skovgaard
    0

    ...Forgot to mention....don't know if there is an easy way that you can replace the special characters on the images already uploaded...

    /Jan

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Mar 17, 2012 @ 21:54
    Bjarne Fyrstenborg
    0

    Hi Jan..

    You're right.. when uploading images to Umbraco with the default upload datatype it replace the character, e.g. to /media/41641/h_ndjernstaske__ben.jpg when the filename is håndjernstaske åben .. with å and an empty character.

    I am using Gecko Uploadify to upload multiple images.. so it seems it doesn't replace speciel characters.. which sometimes can be a problem.

    Bjarne

Please Sign in or register to post replies

Write your reply to:

Draft