Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem bei Dateinamen mit unterschiedlicher Groß- und Kleinschreibung #1433

Closed
Samson1964 opened this issue Mar 17, 2018 · 12 comments
Closed
Assignees
Labels
Milestone

Comments

@Samson1964
Copy link

Die Dateiverwaltung von Contao 4.4.14 hat Probleme Dateien mit unterschiedlicher Groß- und Kleinschreibung zu unterscheiden.

  1. Datei bw_1.JPG per FTP hochladen, in Dateiverwaltung wichtigen Ausschnitt markieren, Metadaten ergänzen.
  2. Datei bw_1.JPG lokal umbenennen in bw_1.jpg und Bild ändern (Kontrast usw.). Danach per FTP hochladen und in Dateiverwaltung mit "Mehrere bearbeiten" beide laden.
  3. bw_1.JPG wird ganz normal angezeigt. Bei bw_1.jpg wird dagegen bw_1.JPG angezeigt (obwohl bw_1.jpg darunter steht). Den wichtigen Teil kann man nicht markieren, weil darunter stattdessen die Eingabefelder für den wichtigen Teil angezeigt werden. Es werden zudem die Metaangaben von bw_1.JPG angezeigt.

Es wäre zudem hilfreich, könnte man auch die Dateiendung bearbeiten. Bisher muß ich immer den zweigleisigen Umweg über FTP und phpMyAdmin machen.

@fiedsch
Copy link
Contributor

fiedsch commented Mar 17, 2018

Es wäre zudem hilfreich, könnte man auch die Dateiendung bearbeiten. Bisher muß ich immer den zweigleisigen Umweg über FTP und phpMyAdmin machen.

Das dürfte höchstwahrscheinlich an der in der DB eingestellten COLLATION liegen. Aber unabhängig davon: zwei Dateien mit "gleichen" Namen dir sich nur durch Groß-/Kleinschreibung unterscheiden provozieren m.E. Anwenderfehler und zudem dürften Windows-User lokal damit sowieso Probleme haben.

Es wäre zudem hilfreich, könnte man auch die Dateiendung bearbeiten. Bisher muß ich immer den zweigleisigen Umweg über FTP und phpMyAdmin machen.

Das wäre m.E. sinnlos, denn ein *.jpg wird durch Umbenennen nicht zu einem *.png
(oder hast Du *.JPG in *.jpg umbenennen gemeint?).

@Samson1964
Copy link
Author

Als Windows-User habe ich immer Probleme, wenn ich das Web synchronisiere, weil Redakteure ihre Dateien vor dem Hochladen nicht richtig benennen. Und ich will JPG natürlich in jpg umbenennen. Wenn ich ein PNG brauche, konvertiere ich das JPG lokal.

@leofeyer
Copy link
Member

@contao/developers Should we change the collation of tl_files.path, tl_files.name and probably tl_files.extension to utf8_bin so the fields become case-sensitive similar to tl_page.alias?

@leofeyer
Copy link
Member

Or is this a known limitation as not all file systems support case-sensitive filenames?

@Toflar
Copy link
Member

Toflar commented Mar 19, 2018

as not all file systems support case-sensitive filenames?

Which ones do not?

@fritzmg
Copy link
Contributor

fritzmg commented Mar 19, 2018

Which ones do not?

NTFS for example 🙊 (and FAT presumably)

@Aybee
Copy link
Contributor

Aybee commented Mar 19, 2018

Windows does not. In Windows Foo.txt is the same file as foo.txt.

IMHO Contao should watch out that there is no Foo.txt and foo.txt in the same folder. Also no Subfolder and subfolder in the same folder.

I use proper-filenames https://github.com/numero2/contao-proper-filenames so the editors can not upload files with uppercase letters.

@Toflar
Copy link
Member

Toflar commented Mar 19, 2018

I hate IT. Yeah, let's leave that up for discussion for some call.

@ausi
Copy link
Member

ausi commented Mar 19, 2018

Which ones do not?

HFS, HFS+, APFS

@kikmedia
Copy link

In fact NTFS is case sensitive BUT doesn't allow to create file names which differ only by cases. This causes most of the troubles. Even APFS and HFS+ are able to store case sensitive file names if you tell them to do so.

Lesson to learn: One should not make any assumptions regarding the capabilities of a file system. There should be some kind of mechanism for normalizing the name of an uploaded file, IMO preferable to lower case. In fact, with a database assisted file system, the real name of a file doesn't matter at all.

BTW, there is an extension which fixes the issue with jpg/JPG, see https://github.com/numero2/contao-proper-filenames @Samson1964

@leofeyer leofeyer added this to the 4.6.0 milestone Apr 12, 2018
@leofeyer
Copy link
Member

Should we change the collation of tl_files.path, tl_files.name and probably tl_files.extension to utf8_bin so the fields become case-sensitive similar to tl_page.alias?

As discussed in Mumble on April 12th, this is what we want to do.

@leofeyer
Copy link
Member

Changed in 39d45b3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants