[TYPO3-core] FileUpload conflict handling

Frans Saris franssaris at gmail.com
Thu Feb 27 13:45:53 CET 2014


2014-02-27 5:33 GMT+01:00 Markus Klein <klein.t3 at mfc-linz.at>:

>
> 2) Uploading existing files
> When a file with an existing filename is uploaded and conflict mode isn't
> set to override, I think the system should check if the content of the old
> and new file are the same (compare there hashes).  When they are the same
> the system should handle the upload as succesfull (maybe with a different
> log message in system log then a normal succesfull upload). From the
> editors pov I think this would be a great improvement.  Especially for the
> DocModule file upload.
>
> Assumption: Content-hashes are only checked within storage
> The cases for uploading a file again are:
> 1.) same name, same content, override -> mask as successful
>
Don't think this should be changed. So just override the current file


> 2.) same name, same content, no override -> error, tell the user the file
> exists
>
IMO this one should "mask as successful".

Use-case: Editor uploads some files directly in the content element. This
way he doesn't have to open the element browser to upload/select files to
use.
Now he uploads a file he already uploaded some time ago.
When we break the upload process with a "File already exists message" the
editor still has to open the element browser to search and select the
existing file.

If we "mask as successful" the editor is happy and nobody gets hurt :)


> 3.) same name, other content, override -> replace the file content and
> keep references

4.) same name, other content, no override -> rename the uploaded file
>
Think this should be the default behaviour again like in the 4.* branches.
Not the cancel upload as it now is.


> 5.) other name, same content, override  -> rename the existing file and
> keep references
>
I'm not sure about this. Are we talking only about files in the same folder?
Do not think this is wanted behaviour.


> 6.) other name, same content, no override  -> error, tell user file does
> already exist
>
If you search for files with the same content it could be thats there is a
file with the same content but on a location that the editor isn't allowed
to access.


> Furthermore we lack a 'replace' function, to replace an existing file with
> a completely different (other name, other content) file, but keeping the
> references.
> This is a MUST HAVE IMHO.


> What's your opinion about this?
>

There are currently 3 conflict modes
1. replace
2. cancel
3. changeName

Currently 1 & 2 are in use by the fileupload in BE. But think this should
be 1 & 3.

gr. Frans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20140227/324e8a69/attachment.htm>


More information about the TYPO3-team-core mailing list