Project

General

Profile

Actions

Bug #80084

closed

BE fileupload check for already existing filename fails

Added by Preben Rather Sørensen about 7 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2017-03-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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'

Actions #1

Updated by Mona Muzaffar about 7 years ago

  • 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.

Actions #2

Updated by Preben Rather Sørensen about 7 years ago

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'

Actions #3

Updated by Mona Muzaffar almost 7 years ago

  • Status changed from Needs Feedback to New
Actions #4

Updated by Susanne Moog about 5 years ago

  • 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.

Actions

Also available in: Atom PDF