Bug #80084
closed
BE fileupload check for already existing filename fails
Added by Preben Rather Sørensen over 7 years ago.
Updated over 5 years ago.
Category:
File Abstraction Layer (FAL)
Description
Case:
Under upload, the check for already existing filename fails.
Reproduce:
A file named “rødgrød_med_fløde.jpg’ already exists. And server is running [SYS][UTF8filesystem] = 1.
- Change [SYS][UTF8filesystem] from '1' to '0'
- Upload a new file 'rødgrød_med_fløde.jpg'
- to overwrite the already existing file 'rødgrød_med_fløde.jpg'
- ... or to replace the already existing file ‘rødgrød_med_fløde.jpg'
Expected result:
I expect the warning '...file already exists...' and options to either cancel, rename or overwrite
Actual result:
The file uploads to server with the name 'roedgroed_med_floede.jpg' as a new file in sys_file and storage and co-exists with 'rødgrød_med_fløde.jpg'
- Status changed from New to Needs Feedback
Hello Preben,
this is not really a bug. When you change the character encoding of a system, already existing files don't get changed.
Only the files which you upload after the change are encoded.
So in your case those two files are not identical anymore, since they don't have the same character encoding.
I get your point. But if the check on if the file excists was before renaming, it would solve the problem. It might not be a big issue for new TYPO3 installations since the default setting is [SYS][UTF8filesystem] = 0. But for older installations, before it all went UTF8 ish, it would be a great help, if it was possible to change and continue into a filesystem without 'rødgrød_med_fløde.jpg'
- Status changed from Needs Feedback to New
- Status changed from New to Closed
Though I get your point I'm going to close the issue, as implementing the check before the renaming would not be a solution, as we'd then need to check twice (once with the old, once with the sanitized file name) which would double file IO. The check is meant to work when the target file exists already, which in your case it doesn't. If you think this is wrong or have a better idea on how to implement this, feel free to open a new ticket.
Also available in: Atom
PDF