Problems in displaying an image with the marked name in the folder

Asked

Viewed 105 times

1

Folks I am updating a project of a client that was originally made in Vb.net and am moving to Laravel 5.1. Ta all right only one problem with the display of certain images that has in the folder name some accented character. Example:

<img src="uploads/marcas/Imóveis/2013/5/s5erntjnoiorawwuegltdjfv000.jpg">

If I rename the Real Estate folder to Immovable without the accent and raise the path to

<img src="uploads/marcas/Imóveis/2013/5/s5erntjnoiorawwuegltdjfv000.jpg">

works right. But since there are many but many folders with accented names I would like to see if there is any way this works without me having to rename the folders.

Thank you

  • 1

    Despite the work it gives, renaming would be a good. Accents and spaces in path and URL are usually a source of headache and waste of time. It would be good to avoid capital letters as well.

  • I agree with @Bacco, it would be a good thing to set a default for the directory names including.

  • A possible solution would be to make a script to rename the files automatically for you.

  • Accent filename prevents file downloading, ie IE and Chrome return with error.

  • I agree with @Bacco, the problem is that there are many folders and as the site was already ready it would be very complicated to do this at this time of the championship. I hope to get some other solution otherwise I will have to rethink on how to rename and link to the database. For now thanks for the help.

  • Have you tried using Blade’s syntax {!! !} to ensure that the variable does not pass html escape?

  • I tried it. And it’s not right. The only solution is @Bacco’s suggestion.

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.