Skip to content

Uploaded files keeps original date on bigger files #14982

Closed

Description

@amarttinez

Steps to reproduce

  1. Upload any file bigger than 10MB (Drag&Drop or '+' Button)

Expected behaviour

Uploaded file modified date/time should be current date/time (now)

Actual behaviour

Uploaded file keeps its original time/date
This is a big problem when using 'File Retention' app.

Tests and Results

  • Chrome for Windows (v73.0.3683.86)
    Uploads bigger than 10MB keeps original modified date.
    Uploads smaller than 10MB modified date/time changes to current.

  • Firefox for Windows (v66) and also ESR v60
    Uploads bigger than 10MB keeps original modified date.
    Uploads smaller than 10MB modified date/time changes to current.

  • Microsoft Edge (Windows 10 1803)
    All upload’s modified date/time changes to current.

  • Microsoft Internet Explorer 11
    All upload’s modified date/time changes to current.

Server configuration

Nextcloud version: 15.0.5.3
Operating system: Ubuntu 18.04.2 LTS
Mysql version: 10.1.38
Apache version: 2.4.29
PHP version: 7.2.15

List of activated apps:

App list

Enabled:
  - accessibility: 1.1.0
  - activity: 2.8.2
  - admin_audit: 1.5.0
  - bruteforcesettings: 1.3.0
  - cloud_federation_api: 0.1.0
  - comments: 1.5.0
  - dav: 1.8.1
  - federatedfilesharing: 1.5.0
  - files: 1.10.0
  - files_accesscontrol: 1.5.0
  - files_automatedtagging: 1.5.0
  - files_pdfviewer: 1.4.0
  - files_retention: 1.4.2
  - files_sharing: 1.7.0
  - files_texteditor: 2.7.0
  - files_trashbin: 1.5.0
  - files_versions: 1.8.0
  - files_videoplayer: 1.4.0
  - gallery: 18.2.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.3.0
  - nextcloud_announcements: 1.4.0
  - notifications: 2.3.0
  - oauth2: 1.3.0
  - password_policy: 1.5.0
  - provisioning_api: 1.5.0
  - quota_warning: 1.4.0
  - serverinfo: 1.5.0
  - sharebymail: 1.5.0
  - support: 1.0.0
  - systemtags: 1.5.0
  - theming: 1.6.0
  - twofactor_backupcodes: 1.4.1
  - updatenotification: 1.5.0
  - user_ldap: 1.5.0
  - user_usage_report: 1.1.1
  - workflowengine: 1.5.0
Disabled:
  - encryption
  - federation
  - files_external
  - firstrunwizard
  - survey_client

Nextcloud configuration:

Config report
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "svesnextcloud",
            "svesnextcloud.imcnt.com",
            "sharing.imcnt.com",
            "10.0.0.145"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "15.0.5.3",
        "overwrite.cli.url": "http:\/\/svesnextcloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "skeletondirectory": "",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "updater.release.channel": "production",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_smtpport": "25",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "default_language": "en",
        "default_locale": "es_ES",
        "maintenance": false,
        "loglevel": 2

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP

LDAP configuration

LDAP config
+-------------------------------+-------------------------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                                   |
+-------------------------------+-------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                     |
| homeFolderNamingRule          |                                                                                                       |
| lastJpegPhotoLookup           | 0                                                                                                     |
| ldapAgentName                 | CN=***                  |
| ldapAgentPassword             | ***                                                                                                   |
| ldapAttributesForGroupSearch  |                                                                                                       |
| ldapAttributesForUserSearch   |                                                                                                       |
| ldapBackupHost                |                                                                                                       |
| ldapBackupPort                |                                                                                                       |
| ldapBase                      | DC=***,DC=com                                                                                       |
| ldapBaseGroups                | DC=***,DC=com                                                                                       |
| ldapBaseUsers                 | DC=***,DC=com                                                                                       |
| ldapCacheTTL                  | 600                                                                                                   |
| ldapConfigurationActive       | 1                                                                                                     |
| ldapDefaultPPolicyDN          |                                                                                                       |
| ldapDynamicGroupMemberURL     |                                                                                                       |
| ldapEmailAttribute            | mail                                                                                                  |
| ldapExperiencedAdmin          | 1                                                                                                     |
| ldapExpertUUIDGroupAttr       |                                                                                                       |
| ldapExpertUUIDUserAttr        |                                                                                                       |
| ldapExpertUsernameAttr        | sAMAccountName                                                                                        |
| ldapGidNumber                 | gidNumber                                                                                             |
| ldapGroupDisplayName          | cn                                                                                                    |
| ldapGroupFilter               |                                                                                                       |
| ldapGroupFilterGroups         |                                                                                                       |
| ldapGroupFilterMode           | 0                                                                                                     |
| ldapGroupFilterObjectclass    |                                                                                                       |
| ldapGroupMemberAssocAttr      | member                                                                                                |
| ldapHost                      | 10.0.0.10                                                                                             |
| ldapIgnoreNamingRules         |                                                                                                       |
| ldapLoginFilter               | (&(|(|(memberof=CN=***,CN=***,DC=***,DC=com)(primaryGroupID=513)))(samaccountname=%uid)) |
| ldapLoginFilterAttributes     |                                                                                                       |
| ldapLoginFilterEmail          | 0                                                                                                     |
| ldapLoginFilterMode           | 0                                                                                                     |
| ldapLoginFilterUsername       | 1                                                                                                     |
| ldapNestedGroups              | 0                                                                                                     |
| ldapOverrideMainServer        |                                                                                                       |
| ldapPagingSize                | 500                                                                                                   |
| ldapPort                      | 389                                                                                                   |
| ldapQuotaAttribute            |                                                                                                       |
| ldapQuotaDefault              |                                                                                                       |
| ldapTLS                       | 0                                                                                                     |
| ldapUserAvatarRule            | default                                                                                               |
| ldapUserDisplayName           | displayname                                                                                           |
| ldapUserDisplayName2          |                                                                                                       |
| ldapUserFilter                | (|(|(memberof=CN=***,CN=***,DC=***,DC=com)(primaryGroupID=513)))                         |
| ldapUserFilterGroups          | Domain Users                                                                                          |
| ldapUserFilterMode            | 0                                                                                                     |
| ldapUserFilterObjectclass     |                                                                                                       |
| ldapUuidGroupAttribute        | auto                                                                                                  |
| ldapUuidUserAttribute         | auto                                                                                                  |
| turnOffCertCheck              | 0                                                                                                     |
| turnOnPasswordChange          | 0                                                                                                     |
| useMemberOfToDetectMembership | 1                                                                                                     |
+-------------------------------+-------------------------------------------------------------------------------------------------------+

Client configuration

**Browser:**Firefox 66
**Operating system:**Windows 10 (1803)

Logs

Web server error log

Web server error log

Nextcloud log (data/nextcloud.log)

Nextcloud log

Browser log

Browser log

Activity

  1. despens commented on Apr 20, 2019

    @despens

    For my use case it would be great if all files kept their last modified dates, not only the big ones. It might make sense to add an instance-wide config option.

  2. codiflow commented on Apr 23, 2019

    @codiflow

    For my use case it would be great if all files kept their last modified dates, not only the big ones. It might make sense to add an instance-wide config option.

    +1

    For me this would also perfectly make sense. I don't know why so many people need the current timestamp while uploading instead of the files real timestamp.

  3. causer commented on Apr 25, 2019

    @causer

    Yes it would be good to keep original dates of file when upload. E.g. I upload my photo library and want to keep date history.

  4. amarttinez commented on Jul 15, 2019

    @amarttinez
    Author

    Hi @codiflow, our problem with this is related with "files_retention" app. If we create a label, for example named "1-Week-Retention", all files with modified date older than 1 week will be deleted immediately. What I expect, in this case of using "files_retention" is to keep the upload time as file modified date. This make sense for this use. However, I understand what you say of keeping original dates, that should be, maybe, the correct action. But, for the use of "files_retention" is a problem.

  5. amarttinez commented on Jul 22, 2019

    @amarttinez
    Author

    Hello @rullzer, I've tested this with the last Nexcloud 16.0.3, with the same behavior. Any file uploaded and bigger than 10 MB, NC sets "Modified date" with the original file modified date. So, if you have a "Retention" TAG to delete all uploaded files older than 1 DAY, all files bigger than 10 MB are deleted after few seconds. Is there any way to solve this? Thanks in advance.

  6. amarttinez commented on Jul 29, 2019

    @amarttinez
    Author

    Not solved.
    Moved to nextcloud/files_retention
    nextcloud/files_retention#70

  7. changed the title [-]NC keeps original modified date on files bigger than 10MB[/-] [+]Uploaded files keeps original date on bigger files[/+] on Jul 29, 2019
  8. kokotko1337 commented on Sep 26, 2019

    @kokotko1337

    why moved to files_retention ? I have this problem with for example photos 2.5 MB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions