id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 9586 Shall upload_to return an urlencoded string or not? eibaan nobody "Assume a custom upload_to function. If I return any unicode string (for example ""{{{Großköln / €}}}""), that string is tried to use as a filename and as the URL. It might be an invalid file name and/or an invalid URL. If I use django.util.http.urlquote before returning the string, it becomes a valid URL but at the same time, the file is saved as ""{{{Gro%C3%9Fk%C3%B6ln%20/%20%E2%82%AC}}}"" but is tried to load as ""{{{Großköln / €}}}"" (because the browser already decodes it) from the file system. This does not work. I think, the URL (at least the one used in the admin UI) needs to be urlencoded once more. Or the default storage should automatically make sure that it can store files under any name and is not restricted to the restrictions of the file system. I'm not sure what's the best solution but right now, it doesn't work for anything but an unspecified safe subset of characters. And because there's one function that is the base for both the file system name and the URL path segment, I cannot easiliy fix it." Bug closed File uploads/storage 1.0 Normal fixed Accepted 1 0 0 0 0 0