Skip to content

restoring a file from an older version corrupts it. #686

@fabio14

Description

@fabio14

Steps to reproduce

  1. setup files_primary_s3 with aws
  2. upload a file (v1). If I download the current version it is fine
  3. Upload a file (v2) and replace the old version. If I download the current version it is fine
  4. Upload a file (v3) and replace the old version. If I download the current version it is fine
  5. restore the v1 file
  6. download the file

Exected result

v1 file

Actual Result

Partial V1 file or no file.

Note

The binaries on AWS are all fine, and previous versions can all be downloaded correctly from OWC.

Additional Information

While debugging, I noticed that the reference to the file in the oc_filecache table is not updated. Specifically, when a file is restored, all data from the last uploaded version, including the size, remains unchanged, and the record for the current version is not updated. Thus, when restoring the file to version v1, I still see the data for v3 in the database.

If I manually force the correct size with an sql update, I have no problems downloading the file correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions