Closed (fixed)
Project:
FileField Sources
Version:
8.x-1.x-dev
Component:
Source: Remote URL
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Dec 2016 at 20:12 UTC
Updated:
15 Dec 2019 at 01:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
giorgoskHave to also add that the default file upload functiality of core drupal can upload the file
and if the file is rename to LATIN characters it can be uploaded from REMOTE URL
so it sounds like a bug
Comment #3
seaji commentedHere is patch but it is for 7.x version.
Module uses basename() function
Should use drupal_basename()
Comment #4
karaoglanoglou commentedI have applied the patch (7.x-1.11), but it still doesn't work.
Did anyone manage to make it work?
Comment #5
gnugetI've worked on this today and these are my findings:
filefield_sources uses pathinfo to get the name of the file, the problem with this is that
pathinforely in thelocaleto get the correct name of the file.So, in theory setting the locale (using
setlocale) somewhere in the code (a custom module or maybe in the settings.php) will fix this, I tried and it worked for me, there are even a few patches in other modules with a similar problem and the workaround is actually set a temporary locale to allow the code to get the data correctly.Not sure how good is to rely in a generic locale it might break in specific enviroments, maybe the best thing if we want to preserve the filename is document how to set a locale and allow the user to set the correct locale depending their server.
Another idea is to take advantage of the transliteration class that is now part of core.
So, I decided to use transliteration approach.
Patch attached.
Comment #7
gnuget