-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
dont preserve mtime when uploading trough the web interface #3822
Conversation
@icewind1991, thanks for your PR! By analyzing the history of the files in this pull request, we identified @schiessle, @butonic and @luckydonald to be potential reviewers. |
Signed-off-by: Robin Appelman <robin@icewind.nl>
bd6ebe0
to
ad4b5c8
Compare
Codecov Report
@@ Coverage Diff @@
## master #3822 +/- ##
=========================================
Coverage 54.29% 54.29%
Complexity 21053 21053
=========================================
Files 1302 1302
Lines 80280 80280
Branches 1254 1254
=========================================
Hits 43586 43586
Misses 36694 36694 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I do second this. Just had a customer last week complaining about this behaviour as well :)
Please don't bump me. |
@luckydonald sorry, you already saw that mention bot ignores the ignore list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that not preserving mtime might very likely will affect the integrity of the data being uploaded and affect the truth of last modification timestamp of the file.
there should not be any differences between uploading through web interface, or desktop sync, or mobile apps. mtime should always be kept for sack of telling the truth about when is it eventually modified even you revisit and review a file 1/3/5/10/15 years later.
@icewind1991 @nickvergessen Please reconsider the effect of not preserving mtime of a file being upload through the web ui. Preserving mtime is always expected when transferring a file from/to internal drive/flash drive/network drive/memory card/mobile phone. Consider the following scenario:
Please reconsider the effect of not preserving mtime and consider reverting the merged changes. I have also #3572 and nextcloud/files_retention#23 about the issue regarding file retention module. The issue there should be fixed by making use of "upload datetime timestamp" for the retention decision logic instead. That issue should not be fixed by abandoning mtime as of web-ui uploading. Thanks for your attention! |
I totally agree |
Is there any chance that this "feature" will be reverted to old behaviour? Currently I've reverted the corresponding js-file to the old version, but this isn't the way I should do it 😃 |
Totally understood the confusion caused by the false "last-modified" timestamp. The real last-modified timestamp of any particular uploaded files should always be retained throughout the journey and workflow between front-end and back-end. Hope communities could see the issues and consequences of the behaviour and revert it. |
i just added back in the code that had been removed from apps/files/js/file-upload.js as i need the file modified timestamp not when it was uploaded. guess this isnt the best thing to do but works fine for me now. |
While I still maintain the opinion that the current behaviour makes the most sense as a default, I understand that the old behaviour has valid use cases. To "solve" the problem I created a small app that reverts the behaviour to the pre-12 behaviour: https://github.com/icewind1991/files_upload_mtime The app isn't the cleanest way to handle it (dynamically modifying core js...) but it at least removes the need to manually modify the js. |
Hi icewind1991, thanks a lot, this really helps me. I think this is the most elegant way we could do it :) |
I think this behaviour should at least be made optional. I expect a file storage system to preserve metadata when I upload files to it. |
While mtime preservation is expected behaviour when using the sync client I think preserving mtime while uploading trough the web interface is not expected.